-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
67 lines (60 loc) · 3 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0" ?>
<project default="release">
<propertyfile file="./build.properties">
<entry key="major.number" type="int" value="1"/>
<entry key="minor.number" type="int" value="2"/>
<entry key="build.number" type="int" operation="+" value="1" pattern="00"/>
</propertyfile>
<property file="./build.properties"/>
<echo message= "Build ${major.number}.${minor.number}.${build.number}"/>
<property name="cytoscape.dir" value="cytoscape-v2.6.2"/>
<property name="src.dir" value="src"/>
<property name="bin.dir" value="bin"/>
<property name="jar.dir" value="release"/>
<property name="release.dir" value="${cytoscape.dir}/plugins"/>
<property name="version" value="${major.number}.${minor.number}.${build.number}"/>
<property name="jarfile" value="${jar.dir}/PerturbationAnalyzer.v${version}.jar"/>
<property name="main-class" value="dynamic.Perturbation"/>
<mkdir dir="${bin.dir}"/>
<mkdir dir="${jar.dir}"/>
<available file="${cytoscape.dir}" property="cytoscape.present"/>
<available file="release/lib" property="lib.present"/>
<fail unless="cytoscape.present" message="Can not find cytoscape, reset the value of cytoscape.dir in build.xml!"/>
<target name="unzip-lib" unless="lib.present">
<unzip src="lib/jfreechart-1.0.12.jar" dest="release/lib"/>
<unzip src="lib/jcommon-1.0.15.jar" dest="release/lib"/>
</target>
<manifest file="MANIFEST.MF">
<attribute name="Manifest-Version" value="${version}"/>
<attribute name="Created-By" value="pittacus@gmail.com"/>
<attribute name="Cytoscape-Plugin" value="${main-class}"/>
</manifest>
<target name="compile" description="Compilation target">
<javac srcdir="${src.dir}" destdir="${bin.dir}">
<classpath>
<pathelement path="${classpath}"/>
<pathelement location="${cytoscape.dir}/cytoscape.jar"/>
<pathelement location="${cytoscape.dir}/lib/giny.jar"/>
<pathelement location="${cytoscape.dir}/cytoscape-render-stateful.jar"/>
<pathelement location="${cytoscape.dir}/lib/ding.jar"/>
<pathelement location="lib/jfreechart-1.0.12.jar"/>
<pathelement location="lib/jcommon-1.0.15.jar"/>
</classpath>
</javac>
</target>
<target name="compress" depends="compile,unzip-lib" description="Compression target">
<jar jarfile="${jarfile}" manifest="MANIFEST.MF">
<fileset dir="${bin.dir}" includes="dynamic/*.class"/>
<fileset dir="${src.dir}" includes="dynamic/plugin.props"/>
<fileset dir="release/lib" includes="*/"/>
<fileset dir="." includes="COPYING,NOTICE"/>
</jar>
</target>
<target name="release" depends="compress" description="Release jar">
<delete>
<fileset dir="${release.dir}" includes="PerturbationAnalyzer*.jar"/>
</delete>
<copy file="${jarfile}" todir="${release.dir}"/>
<echo message= "Build complete"/>
</target>
</project>