Gentoo Archives: gentoo-commits

From: "Alistair Bush (ali_bush)" <ali_bush@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/odfdom/files: build.xml
Date: Sun, 30 May 2010 02:53:58
Message-Id: 20100530025355.C21AC2CF37@corvid.gentoo.org
1 ali_bush 10/05/30 02:53:55
2
3 Added: build.xml
4 Log:
5 New package odfdom. which will be replacing odfdom-bin.
6 (Portage version: 2.1.8.3/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 dev-java/odfdom/files/build.xml
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/odfdom/files/build.xml?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/odfdom/files/build.xml?rev=1.1&content-type=text/plain
13
14 Index: build.xml
15 ===================================================================
16 <?xml version="1.0" encoding="UTF-8"?>
17
18 <!-- ====================================================================== -->
19 <!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
20 <!-- ====================================================================== -->
21
22 <!-- ====================================================================== -->
23 <!-- ===================== - DO NOT EDIT THIS FILE! - ===================== -->
24 <!-- ====================================================================== -->
25 <!-- -->
26 <!-- Any modifications will be overwritten. -->
27 <!-- -->
28 <!-- Generated by Maven Ant Plugin on 5/26/10 7:38 PM -->
29 <!-- See: http://maven.apache.org/plugins/maven-ant-plugin/ -->
30 <!-- -->
31 <!-- ====================================================================== -->
32
33 <project name="odfdom-java-from-maven" default="package" basedir=".">
34
35 <!-- ====================================================================== -->
36 <!-- Build environment properties -->
37 <!-- ====================================================================== -->
38
39 <property file="maven-build.properties"/>
40
41 <property name="maven.build.finalName" value="odfdom"/>
42 <property name="maven.build.dir" value="target"/>
43 <property name="maven.build.outputDir" value="${maven.build.dir}/classes"/>
44 <property name="maven.build.srcDir.0" value="src/main/java"/>
45 <property name="maven.build.resourceDir.0" value="src/main/resources"/>
46 <property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes"/>
47 <property name="maven.build.testDir.0" value="src/test/java"/>
48 <property name="maven.build.testResourceDir.0" value="src/test/resources"/>
49 <property name="maven.test.reports" value="${maven.build.dir}/test-reports"/>
50 <property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/>
51
52 <property name="maven.repo.local" value="lib"/>
53 <property name="maven.settings.offline" value="false"/>
54 <property name="maven.settings.interactiveMode" value="true"/>
55
56 <!-- ====================================================================== -->
57 <!-- Defining classpaths -->
58 <!-- ====================================================================== -->
59
60 <path id="build.classpath">
61 <fileset dir="lib">
62 <include name="xercesImpl-2.9.1.jar"/>
63 <include name="xml-apis-1.3.04.jar"/>
64 </fileset>
65 </path>
66 <path id="build.test.classpath">
67 <fileset dir="lib">
68 <include name="xercesImpl-2.9.1.jar"/>
69 <include name="xml-apis-1.3.04.jar"/>
70 <include name="junit-4.5.jar"/>
71 </fileset>
72 </path>
73
74 <!-- ====================================================================== -->
75 <!-- Cleaning up target -->
76 <!-- ====================================================================== -->
77
78 <target name="clean" description="Clean the output directory">
79 <delete dir="${maven.build.dir}"/>
80 </target>
81
82 <!-- ====================================================================== -->
83 <!-- Compilation target -->
84 <!-- ====================================================================== -->
85
86 <target name="compile" depends="get-deps" description="Compile the code">
87 <mkdir dir="${maven.build.outputDir}"/>
88 <javac destdir="${maven.build.outputDir}"
89 nowarn="false"
90 debug="true"
91 optimize="false"
92 deprecation="true"
93 target="1.5"
94 verbose="false"
95 fork="false"
96 memoryMaximumSize="512m"
97 memoryInitialSize="1024m"
98 source="1.5">
99 <src>
100 <pathelement location="${maven.build.srcDir.0}"/>
101 </src>
102 <classpath refid="build.classpath"/>
103 </javac>
104 <copy todir="${maven.build.outputDir}">
105 <fileset dir="${maven.build.resourceDir.0}"/>
106 </copy>
107 </target>
108
109 <!-- ====================================================================== -->
110 <!-- Test-compilation target -->
111 <!-- ====================================================================== -->
112
113 <target name="compile-tests"
114 depends="compile"
115 description="Compile the test code"
116 unless="maven.test.skip">
117 <mkdir dir="${maven.build.testOutputDir}"/>
118 <javac destdir="${maven.build.testOutputDir}"
119 nowarn="false"
120 debug="true"
121 optimize="false"
122 deprecation="true"
123 target="1.5"
124 verbose="false"
125 fork="false"
126 memoryMaximumSize="512m"
127 memoryInitialSize="1024m"
128 source="1.5">
129 <src>
130 <pathelement location="${maven.build.testDir.0}"/>
131 </src>
132 <classpath>
133 <path refid="build.test.classpath"/>
134 <pathelement location="${maven.build.outputDir}"/>
135 </classpath>
136 </javac>
137 <copy todir="${maven.build.testOutputDir}">
138 <fileset dir="${maven.build.testResourceDir.0}"/>
139 </copy>
140 <copy todir="${maven.build.outputDir}">
141 <fileset dir="${maven.build.testResourceDir.0}"/>
142 </copy>
143 </target>
144
145 <!-- ====================================================================== -->
146 <!-- Run all tests -->
147 <!-- ====================================================================== -->
148
149 <target name="test"
150 depends="compile-tests, junit-missing"
151 unless="junit.skipped"
152 description="Run the test cases">
153 <mkdir dir="${maven.test.reports}"/>
154 <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
155 <sysproperty key="basedir" value="."/>
156 <formatter type="xml"/>
157 <formatter type="plain" usefile="false"/>
158 <classpath>
159 <path refid="build.test.classpath"/>
160 <pathelement location="${maven.build.outputDir}"/>
161 <pathelement location="${maven.build.testOutputDir}"/>
162 </classpath>
163 <batchtest todir="${maven.test.reports}" unless="test">
164 <fileset dir="${maven.build.testDir.0}">
165 <include name="**/Test*.java"/>
166 <include name="**/*Test.java"/>
167 <include name="**/*TestCase.java"/>
168 <exclude name="**/integrationtest/**"/>
169 </fileset>
170 </batchtest>
171 <batchtest todir="${maven.test.reports}" if="test">
172 <fileset dir="${maven.build.testDir.0}">
173 <include name="**/${test}.java"/>
174 <exclude name="**/integrationtest/**"/>
175 </fileset>
176 </batchtest>
177 </junit>
178 </target>
179
180 <target name="test-junit-present">
181 <available classname="junit.framework.Test" property="junit.present"/>
182 </target>
183
184 <target name="test-junit-status"
185 depends="test-junit-present">
186 <condition property="junit.missing">
187 <and>
188 <isfalse value="${junit.present}"/>
189 <isfalse value="${maven.test.skip}"/>
190 </and>
191 </condition>
192 <condition property="junit.skipped">
193 <or>
194 <isfalse value="${junit.present}"/>
195 <istrue value="${maven.test.skip}"/>
196 </or>
197 </condition>
198 </target>
199
200 <target name="junit-missing"
201 depends="test-junit-status"
202 if="junit.missing">
203 <echo>=================================== WARNING ===================================</echo>
204 <echo> JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.</echo>
205 <echo>===============================================================================</echo>
206 </target>
207
208 <!-- ====================================================================== -->
209 <!-- Javadoc target -->
210 <!-- ====================================================================== -->
211
212 <target name="javadoc" description="Generates the Javadoc of the application">
213 <javadoc sourcepath="${maven.build.srcDir.0}"
214 packagenames="*"
215 destdir="${maven.reporting.outputDirectory}/apidocs"
216 access="protected"
217 old="false"
218 verbose="false"
219 version="true"
220 use="true"
221 author="true"
222 splitindex="true"
223 windowtitle="ODFDOM API v0.8 - http://odftoolkit"
224 nodeprecated="false"
225 nodeprecatedlist="false"
226 notree="false"
227 noindex="false"
228 nohelp="false"
229 nonavbar="false"
230 serialwarn="false"
231 charset="ISO-8859-1"
232 breakiterator="false"
233 maxmemory="1024m">
234 <doctitle>&lt;![CDATA[ODFDOM]]&gt;</doctitle>
235 </javadoc>
236 </target>
237
238 <!-- ====================================================================== -->
239 <!-- Package target -->
240 <!-- ====================================================================== -->
241
242 <target name="package" depends="compile,test" description="Package the application">
243 <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar"
244 compress="true"
245 index="true"
246 basedir="${maven.build.outputDir}"
247 excludes="**/package.html">
248 <manifest>
249 <attribute name="Main-Class"
250 value="org.odftoolkit.odfdom.Version"/>
251 </manifest>
252 </jar>
253 </target>
254
255 <!-- ====================================================================== -->
256 <!-- A dummy target for the package named after the type it creates -->
257 <!-- ====================================================================== -->
258
259 <target name="jar" depends="package" description="Builds the jar for the application"/>
260
261 <!-- ====================================================================== -->
262 <!-- Download dependencies target -->
263 <!-- ====================================================================== -->
264
265 <target name="test-offline">
266 <condition property="maven.mode.offline">
267 <equals arg1="${maven.settings.offline}" arg2="true"/>
268 </condition>
269 </target>
270
271 <target name="get-deps"
272 depends="test-offline"
273 description="Download all dependencies"
274 unless="maven.mode.offline">
275 <mkdir dir="${maven.repo.local}"/>
276 <mkdir dir="${maven.repo.local}/xerces/xercesImpl/2.9.1"/>
277 <get src="http://download.java.net/maven/2//xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"
278 dest="${maven.repo.local}/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"
279 usetimestamp="false"
280 ignoreerrors="true"/>
281 <get src="http://odftoolkit.org/svn/odfdom~maven2/snapshot//xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"
282 dest="${maven.repo.local}/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"
283 usetimestamp="false"
284 ignoreerrors="true"/>
285 <get src="http://odftoolkit.org/svn/odfdom~maven2/release//xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"
286 dest="${maven.repo.local}/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"
287 usetimestamp="false"
288 ignoreerrors="true"/>
289 <get src="http://repo1.maven.org/maven2/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"
290 dest="${maven.repo.local}/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"
291 usetimestamp="false"
292 ignoreerrors="true"/>
293 <mkdir dir="${maven.repo.local}/xml-apis/xml-apis/1.3.04"/>
294 <get src="http://download.java.net/maven/2//xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"
295 dest="${maven.repo.local}/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"
296 usetimestamp="false"
297 ignoreerrors="true"/>
298 <get src="http://odftoolkit.org/svn/odfdom~maven2/snapshot//xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"
299 dest="${maven.repo.local}/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"
300 usetimestamp="false"
301 ignoreerrors="true"/>
302 <get src="http://odftoolkit.org/svn/odfdom~maven2/release//xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"
303 dest="${maven.repo.local}/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"
304 usetimestamp="false"
305 ignoreerrors="true"/>
306 <get src="http://repo1.maven.org/maven2/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"
307 dest="${maven.repo.local}/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"
308 usetimestamp="false"
309 ignoreerrors="true"/>
310 <mkdir dir="${maven.repo.local}/junit/junit/4.5"/>
311 <get src="http://download.java.net/maven/2//junit/junit/4.5/junit-4.5.jar"
312 dest="${maven.repo.local}/junit/junit/4.5/junit-4.5.jar"
313 usetimestamp="false"
314 ignoreerrors="true"/>
315 <get src="http://odftoolkit.org/svn/odfdom~maven2/snapshot//junit/junit/4.5/junit-4.5.jar"
316 dest="${maven.repo.local}/junit/junit/4.5/junit-4.5.jar"
317 usetimestamp="false"
318 ignoreerrors="true"/>
319 <get src="http://odftoolkit.org/svn/odfdom~maven2/release//junit/junit/4.5/junit-4.5.jar"
320 dest="${maven.repo.local}/junit/junit/4.5/junit-4.5.jar"
321 usetimestamp="false"
322 ignoreerrors="true"/>
323 <get src="http://repo1.maven.org/maven2/junit/junit/4.5/junit-4.5.jar"
324 dest="${maven.repo.local}/junit/junit/4.5/junit-4.5.jar"
325 usetimestamp="false"
326 ignoreerrors="true"/>
327 </target>
328
329 </project>