/[volute]/trunk/projects/theory/snapdm/build_java.xml
ViewVC logotype

Contents of /trunk/projects/theory/snapdm/build_java.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 189 - (show annotations)
Wed Apr 9 16:18:25 2008 UTC (12 years, 7 months ago) by bourges.laurent
File MIME type: text/xml
File size: 5987 byte(s)
updated build process :
- added properties (jar file names)
- dist directories
- upToDate checks
- removed run target
- added full javadoc & jar for generated classes
1 <!--
2 build_java.xml file : specific targets for java code
3 -->
4
5
6 <!-- checks if build is necessary : java source code & libraries -->
7 <uptodate property="build.base.notRequired">
8 <srcfiles dir= "${root}" includes="build.properties"/>
9 <srcfiles dir= "${sources}" includes="**/*"/>
10 <srcfiles dir= "${libs}" includes="**/*.jar"/>
11 <mapper type="merge" to="${dist}/${build.file}"/>
12 </uptodate>
13
14
15
16
17 <!-- target makeJava : cleans, compiles java code -->
18 <target name="makeJava" depends="cleanJava, compile">
19 <echo>makeJava : done.</echo>
20 </target>
21
22
23
24
25 <!-- target cleanJava : clean build files -->
26 <target name="cleanJava" depends="init, cleanDist">
27 <echo>cleaning directory : ${build} ...</echo>
28
29 <delete includeemptydirs="true" verbose="true">
30 <fileset dir="${build}" includes="**/*"/>
31 </delete>
32
33 <echo>cleaned directory : ${build} : done.</echo>
34 </target>
35
36
37
38
39 <!-- target cleanJava : clean build files -->
40 <target name="cleanDist" depends="init" unless="build.base.notRequired">
41 <echo>cleaning directory : ${dist} ...</echo>
42
43 <delete includeemptydirs="true" verbose="true">
44 <fileset dir="${dist}" includes="**/*"/>
45 </delete>
46
47 <echo>cleaned directory : ${dist} : done.</echo>
48 </target>
49
50
51
52
53
54 <!-- Compile java files and jar them -->
55 <target name="compile" depends="cleanJava" unless="build.base.notRequired">
56 <echo>compile ${base.title} ...</echo>
57 <echo>compile from : ${sources}</echo>
58 <echo>compile to : ${build.src}</echo>
59
60 <mkdir dir="${build.src}"/>
61
62 <javac sourcepath="" srcdir="${sources}" destdir="${build.src}" listfiles="false"
63 fork="true" verbose="false" encoding="UTF-8"
64 debug="on" deprecation="on" optimize="on" casesensitive="true"
65 source="1.5" target="1.5">
66
67 <classpath refid="project.class.path" />
68
69 <include name="**/*.java"/>
70 </javac>
71
72 <pathconvert pathsep=" " property="jar.classpath">
73 <path refid="project.class.path"/>
74 <map from="${root}/" to=""/>
75 </pathconvert>
76
77 <jar jarfile="${dist}/${build.file}" compress="true">
78 <fileset dir="${build.src}" />
79 <fileset file="${sources}/log4j.*" />
80
81 <manifest>
82 <attribute name="Built-By" value="${build.by}"/>
83 <attribute name="Built-Date" value="${build.date}"/>
84
85 <attribute name="Build-Jdk" value="${java.vm.version}"/>
86 <attribute name="Build-Os" value="${os.name} ${os.version} - ${os.arch}"/>
87
88 <attribute name="Class-Path" value="${jar.classpath}"/>
89
90 <section name="Common">
91 <attribute name="Specification-Title" value="${base.title}"/>
92 <attribute name="Specification-Version" value="${version}"/>
93 <attribute name="Specification-Vendor" value="${vendor}"/>
94 <attribute name="Implementation-Title" value="${base.title}"/>
95 <attribute name="Implementation-Version" value="${version} - ${build.date}"/>
96 </section>
97 </manifest>
98
99 </jar>
100
101 <delete dir="${build.src}"/>
102
103 <echo>compile ${base.title} : done.</echo>
104 </target>
105
106
107
108
109 <!-- target makeOutput : compiles generated java code and javadoc -->
110 <target name="makeOutput" depends="compileOutput, makeJavaDoc">
111 <echo>makeOutput : done.</echo>
112 </target>
113
114
115
116
117 <!-- Compile generated java files -->
118 <target name="compileOutput" depends="compile">
119 <echo>compile ${gen.title} ...</echo>
120 <echo>compile from : ${sources.gen}</echo>
121 <echo>compile to : ${build.gen}</echo>
122
123 <mkdir dir="${build.gen}"/>
124
125 <javac sourcepath="" srcdir="${sources.gen}" destdir="${build.gen}" listfiles="false"
126 fork="true" verbose="false" encoding="UTF-8"
127 debug="on" deprecation="on" optimize="on" casesensitive="true"
128 source="1.5" target="1.5">
129
130 <classpath refid="infrastructure.class.path" />
131
132 <include name="**/*.java"/>
133 </javac>
134
135 <pathconvert pathsep=" " property="jar.gen.classpath">
136 <path refid="infrastructure.class.path"/>
137 <map from="${dist}/" to=""/>
138 </pathconvert>
139
140 <jar jarfile="${sources.gen.dist}/${build.gen.file}" compress="true">
141 <fileset dir="${build.gen}" />
142
143 <manifest>
144 <attribute name="Built-By" value="${build.by}"/>
145 <attribute name="Built-Date" value="${build.date}"/>
146
147 <attribute name="Build-Jdk" value="${java.vm.version}"/>
148 <attribute name="Build-Os" value="${os.name} ${os.version} - ${os.arch}"/>
149
150 <attribute name="Class-Path" value="${jar.gen.classpath}"/>
151
152 <section name="Common">
153 <attribute name="Specification-Title" value="${gen.title}"/>
154 <attribute name="Specification-Version" value="${version}"/>
155 <attribute name="Specification-Vendor" value="${vendor}"/>
156 <attribute name="Implementation-Title" value="${gen.title}"/>
157 <attribute name="Implementation-Version" value="${version} - ${build.date}"/>
158 </section>
159 </manifest>
160
161 </jar>
162
163 <!-- remove to avoid classes in svn -->
164 <delete dir="${build.gen}"/>
165
166 <echo>compile ${gen.title} : done.</echo>
167 </target>
168
169
170
171
172 <!-- target makeJavaDoc : creates javadoc from source code -->
173 <target name="makeJavaDoc">
174 <echo>making generated Java classes javadoc ...</echo>
175
176 <mkdir dir="${sources.gen.docs}"/>
177
178 <javadoc additionalparam="-notimestamp"
179 destdir="${sources.gen.docs}"
180 access="private"
181 author="true"
182 use="false"
183 windowtitle="${source} : ${gen.title}" >
184
185 <classpath refid="project.class.path" />
186
187 <fileset dir="${sources}" defaultexcludes="yes" includes="**/*.java" />
188 <fileset dir="${sources.gen}" defaultexcludes="yes" includes="**/*.java" />
189
190 </javadoc>
191
192 <echo>generated Java classes javadoc : done.</echo>
193 </target>
194
195
196 <!-- end of build_java.xml -->

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26