forked from mebigfatguy/apophysis-j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
187 lines (172 loc) · 6.4 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!--
Apophysis-j Copyright (C) 2011 Dave Brosius
-->
<project name="apophysis-j" default="build">
<property file="build.properties"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="plugins.dir" value="${basedir}/plugins"/>
<property name="classes.dir" value="${basedir}/classes"/>
<property name="pluginsclasses.dir" value="${basedir}/plugin_classes"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="javadoc.dir" value="${basedir}/javadoc"/>
<property name="jnlp.dir" value="${basedir}/jnlp"/>
<property name="javac.source" value="1.7"/>
<property name="javac.target" value="1.7"/>
<property name="javac.deprecation" value="on"/>
<property name="javac.debug" value="on"/>
<target name="clean" description="removes all generated collateral">
<delete dir="${classes.dir}"/>
<delete dir="${pluginsclasses.dir}"/>
<delete dir="${javadoc.dir}"/>
<delete file="${basedir}/apophysis-j-${apophysis-j.version}.jar"/>
<delete file="${basedir}/apophysis-j-src-${apophysis-j.version}.zip"/>
<delete quiet="true">
<fileset dir="${jnlp.dir}">
<include name="*.jar"/>
<include name="*.jnlp"/>
</fileset>
</delete>
</target>
<target name="-init" description="prepares repository for a build">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${pluginsclasses.dir}"/>
<mkdir dir="${javadoc.dir}"/>
<mkdir dir="${jnlp.dir}"/>
<path id="apophysis-j.classpath">
<pathelement location="${classes.dir}"/>
<pathelement location="${lib.dir}/js.jar"/>
</path>
</target>
<target name="resources" depends="-init" description="copies resources to the classes directory">
<copy todir="${classes.dir}">
<fileset dir="${src.dir}">
<include name="**/*.xml"/>
<include name="**/*.txt"/>
<include name="**/*.gif"/>
<include name="**/*.dat"/>
</fileset>
</copy>
<copy todir="${pluginsclasses.dir}">
<fileset dir="${plugins.dir}">
<include name="**/*.txt"/>
</fileset>
</copy>
<copy todir="${jnlp.dir}">
<fileset dir="${basedir}">
<include name="*.jnlp"/>
</fileset>
</copy>
<replaceregexp byline="true">
<regexp pattern="\$VERSION"/>
<substitution expression="${apophysis-j.version}"/>
<fileset dir="${jnlp.dir}">
<include name="*.jnlp"/>
</fileset>
</replaceregexp>
</target>
<target name="compile" depends="-init" description="compiles java files">
<javac srcdir="${src.dir}"
destdir="${classes.dir}"
source="${javac.source}"
target="${javac.target}"
deprecation="${javac.deprecation}"
debug="${javac.debug}"
includeantruntime="false">
<classpath refid="apophysis-j.classpath"/>
</javac>
<javac srcdir="${plugins.dir}"
destdir="${pluginsclasses.dir}"
source="${javac.source}"
target="${javac.target}"
deprecation="${javac.deprecation}"
debug="${javac.debug}"
includeantruntime="false">
<classpath refid="apophysis-j.classpath"/>
</javac>
</target>
<target name="jar" depends="compile" description="produces the apophysis-j jar file">
<jar destfile="${basedir}/apophysis-j-${apophysis-j.version}.jar">
<fileset dir="${classes.dir}">
<include name="**/*.class"/>
<include name="**/*.xml"/>
<include name="**/*.txt"/>
<include name="**/*.gif"/>
<include name="**/*.dat"/>
</fileset>
<manifest>
<attribute name="apophysis-j-version" value="${apophysis-j.version}"/>
<attribute name="Main-Class" value="org.apophysis.Apophysis"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="apophysis-j"/>
<attribute name="Bundle-SymbolicName" value="apophysis-j; singleton:=true"/>
<attribute name="Bundle-Version" value="${apophysis-j.version}"/>
<attribute name="Bundle-ClassPath" value="."/>
<attribute name="Bundle-Vendor" value="Apophysis-j Project"/>
<attribute name="Bundle-ActivationPolicy" value="lazy"/>
</manifest>
</jar>
<jar destfile="${basedir}/apophysis-j-plugins-${apophysis-j.version}.jar">
<fileset dir="${pluginsclasses.dir}">
<include name="**/*.class"/>
<include name="**/*.txt"/>
</fileset>
<manifest>
<attribute name="apophysis-j-version" value="${apophysis-j.version}"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="apophysis-j-plugins"/>
<attribute name="Bundle-SymbolicName" value="apophysis-j-plugins; singleton:=true"/>
<attribute name="Bundle-Version" value="${apophysis-j.version}"/>
<attribute name="Bundle-ClassPath" value="."/>
<attribute name="Bundle-Vendor" value="Apophysis-j Plugins Project"/>
<attribute name="Bundle-ActivationPolicy" value="lazy"/>
</manifest>
</jar>
</target>
<target name="srczip" description="builds the source distribution zip file">
<zip destfile="${basedir}/apophysis-j-src-${apophysis-j.version}.zip" basedir="${basedir}">
<fileset dir="${src.dir}">
<include name="**/*.java"/>
<include name="**/*.xml"/>
<include name="**/*.license"/>
<include name="**/*.txt"/>
<include name="lib/*.jar"/>
</fileset>
<fileset dir="${plugins.dir}">
<include name="**/*.java"/>
<include name="**/*.txt"/>
</fileset>
</zip>
</target>
<target name="javadoc" depends="-init" description="build the javadoc for the project">
<javadoc packagenames="org.apophysis.*"
sourcepath="${src.dir}"
classpathref="apophysis-j.classpath"
destdir="${javadoc.dir}"
windowtitle="Apophysis api">
<doctitle><![CDATA[<h1>apophysis-j javadoc</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2011 Jean-Francois Bouzereau, Dave Brosius. All Rights Reserved.</i>]]></bottom>
</javadoc>
</target>
<target name="build" depends="clean, -init, compile, resources, jar" description="builds the jar">
</target>
<target name="jnlp" description="copy jars to jnlp directory">
<copy todir="${jnlp.dir}">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${basedir}">
<include name="*.jar"/>
</fileset>
</copy>
<input message="Enter keystore password" addproperty="pass"/>
<signjar keystore="apophysis-j.store"
alias="apophysis-j"
keypass="${pass}"
storepass="${pass}">
<fileset dir="${jnlp.dir}">
<include name="*.jar"/>
</fileset>
</signjar>
</target>
<target name="release" depends="build, jnlp, srczip, javadoc" description="prepares everything for a release"/>
</project>