Gentoo Archives: gentoo-commits

From: "Jean-Noel Rivasseau (elvanor)" <elvanor@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/commons-cli/files: build-1.2.xml
Date: Fri, 27 Mar 2009 19:54:49
Message-Id: E1LnI8d-0000ba-Gd@stork.gentoo.org
1 elvanor 09/03/27 19:54:47
2
3 Added: build-1.2.xml
4 Log:
5 commons-cli bump to 1.2
6 (Portage version: 2.1.6.7/cvs/Linux i686)
7
8 Revision Changes Path
9 1.1 dev-java/commons-cli/files/build-1.2.xml
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/commons-cli/files/build-1.2.xml?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/commons-cli/files/build-1.2.xml?rev=1.1&content-type=text/plain
13
14 Index: build-1.2.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 3/27/09 6:50 PM -->
29 <!-- See: http://maven.apache.org/plugins/maven-ant-plugin/ -->
30 <!-- -->
31 <!-- ====================================================================== -->
32
33 <project name="commons-cli-from-maven" default="package" basedir=".">
34
35 <!-- ====================================================================== -->
36 <!-- Build environment properties -->
37 <!-- ====================================================================== -->
38
39 <property file="${user.home}/.m2/maven.properties"/>
40 <property file="maven-build.properties"/>
41
42 <property name="maven.build.finalName" value="commons-cli-1.2"/>
43 <property name="maven.build.dir" value="target"/>
44 <property name="maven.build.outputDir" value="${maven.build.dir}/classes"/>
45 <property name="maven.build.srcDir.0" value="src/java"/>
46 <property name="maven.build.resourceDir.0" value="."/>
47 <property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes"/>
48 <property name="maven.build.testDir.0" value="src/test"/>
49 <property name="maven.build.testResourceDir.0" value="src/test/resources"/>
50 <property name="maven.test.reports" value="${maven.build.dir}/test-reports"/>
51 <property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/>
52
53 <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
54 <property name="maven.settings.offline" value="false"/>
55 <property name="maven.settings.interactiveMode" value="true"/>
56
57 <!-- ====================================================================== -->
58 <!-- Defining classpaths -->
59 <!-- ====================================================================== -->
60
61 <path id="build.classpath">
62 </path>
63 <path id="build.test.classpath">
64 </path>
65
66 <!-- ====================================================================== -->
67 <!-- Cleaning up target -->
68 <!-- ====================================================================== -->
69
70 <target name="clean" description="Clean the output directory">
71 <delete dir="${maven.build.dir}"/>
72 </target>
73
74 <!-- ====================================================================== -->
75 <!-- Compilation target -->
76 <!-- ====================================================================== -->
77
78 <target name="compile" depends="get-deps" description="Compile the code">
79 <mkdir dir="${maven.build.outputDir}"/>
80 <javac destdir="${maven.build.outputDir}"
81 encoding="iso-8859-1"
82 nowarn="false"
83 debug="true"
84 optimize="false"
85 deprecation="true"
86 target="1.4"
87 verbose="false"
88 fork="false"
89 source="1.4">
90 <src>
91 <pathelement location="${maven.build.srcDir.0}"/>
92 </src>
93 <classpath refid="build.classpath"/>
94 </javac>
95 <mkdir dir="${maven.build.outputDir}/META-INF"/>
96 <copy todir="${maven.build.outputDir}/META-INF">
97 <fileset dir="${maven.build.resourceDir.0}">
98 <include name="NOTICE.txt"/>
99 <include name="LICENSE.txt"/>
100 </fileset>
101 </copy>
102 </target>
103
104 <!-- ====================================================================== -->
105 <!-- Test-compilation target -->
106 <!-- ====================================================================== -->
107
108 <target name="compile-tests"
109 depends="compile"
110 description="Compile the test code"
111 unless="maven.test.skip">
112 <mkdir dir="${maven.build.testOutputDir}"/>
113 <javac destdir="${maven.build.testOutputDir}"
114 encoding="iso-8859-1"
115 nowarn="false"
116 debug="true"
117 optimize="false"
118 deprecation="true"
119 target="1.4"
120 verbose="false"
121 fork="false"
122 source="1.4">
123 <src>
124 <pathelement location="${maven.build.testDir.0}"/>
125 </src>
126 <classpath>
127 <path refid="build.test.classpath"/>
128 <pathelement location="${maven.build.outputDir}"/>
129 </classpath>
130 </javac>
131 </target>
132
133 <!-- ====================================================================== -->
134 <!-- Run all tests -->
135 <!-- ====================================================================== -->
136
137 <target name="test"
138 depends="compile-tests, junit-missing"
139 unless="junit.skipped"
140 description="Run the test cases">
141 <mkdir dir="${maven.test.reports}"/>
142 <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
143 <sysproperty key="basedir" value="."/>
144 <formatter type="xml"/>
145 <formatter type="plain" usefile="false"/>
146 <classpath>
147 <path refid="build.test.classpath"/>
148 <pathelement location="${maven.build.outputDir}"/>
149 <pathelement location="${maven.build.testOutputDir}"/>
150 </classpath>
151 <batchtest todir="${maven.test.reports}" unless="test">
152 <fileset dir="${maven.build.testDir.0}">
153 <include name="**/Test*.java"/>
154 <include name="**/*Test.java"/>
155 <include name="**/*TestCase.java"/>
156 <exclude name="**/*Abstract*Test.java"/>
157 </fileset>
158 </batchtest>
159 <batchtest todir="${maven.test.reports}" if="test">
160 <fileset dir="${maven.build.testDir.0}">
161 <include name="**/${test}.java"/>
162 <exclude name="**/*Abstract*Test.java"/>
163 </fileset>
164 </batchtest>
165 </junit>
166 </target>
167
168 <target name="test-junit-present">
169 <available classname="junit.framework.Test" property="junit.present"/>
170 </target>
171
172 <target name="test-junit-status"
173 depends="test-junit-present">
174 <condition property="junit.missing">
175 <and>
176 <isfalse value="${junit.present}"/>
177 <isfalse value="${maven.test.skip}"/>
178 </and>
179 </condition>
180 <condition property="junit.skipped">
181 <or>
182 <isfalse value="${junit.present}"/>
183 <istrue value="${maven.test.skip}"/>
184 </or>
185 </condition>
186 </target>
187
188 <target name="junit-missing"
189 depends="test-junit-status"
190 if="junit.missing">
191 <echo>=================================== WARNING ===================================</echo>
192 <echo> JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.</echo>
193 <echo>===============================================================================</echo>
194 </target>
195
196 <!-- ====================================================================== -->
197 <!-- Javadoc target -->
198 <!-- ====================================================================== -->
199
200 <target name="javadoc" description="Generates the Javadoc of the application">
201 <javadoc sourcepath="${maven.build.srcDir.0}"
202 packagenames="*"
203 destdir="${maven.reporting.outputDirectory}/apidocs"
204 access="protected"
205 old="false"
206 verbose="false"
207 encoding="iso-8859-1"
208 version="true"
209 use="true"
210 author="true"
211 splitindex="false"
212 nodeprecated="false"
213 nodeprecatedlist="false"
214 notree="false"
215 noindex="false"
216 nohelp="false"
217 nonavbar="false"
218 serialwarn="false"
219 charset="ISO-8859-1"
220 source="1.4"
221 linksource="true"
222 breakiterator="false">
223 <link href="http://java.sun.com/javase/6/docs/api/"/>
224 </javadoc>
225 </target>
226
227 <!-- ====================================================================== -->
228 <!-- Package target -->
229 <!-- ====================================================================== -->
230
231 <target name="package" depends="compile" description="Package the application">
232 <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar"
233 compress="true"
234 index="false"
235 basedir="${maven.build.outputDir}"
236 excludes="**/package.html"/>
237 </target>
238
239 <!-- ====================================================================== -->
240 <!-- A dummy target for the package named after the type it creates -->
241 <!-- ====================================================================== -->
242
243 <target name="jar" depends="package" description="Builds the jar for the application"/>
244
245 <!-- ====================================================================== -->
246 <!-- Download dependencies target -->
247 <!-- ====================================================================== -->
248
249 <target name="test-offline">
250 <condition property="maven.mode.offline">
251 <equals arg1="${maven.settings.offline}" arg2="true"/>
252 </condition>
253 </target>
254
255 <target name="get-deps"
256 depends="test-offline"
257 description="Download all dependencies"
258 unless="maven.mode.offline">
259 <mkdir dir="${maven.repo.local}"/>
260 <mkdir dir="${maven.repo.local}/junit/junit/3.8.1"/>
261 <get src="http://people.apache.org/repo/m2-snapshot-repository/junit/junit/3.8.1/junit-3.8.1.jar"
262 dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar"
263 usetimestamp="false"
264 ignoreerrors="true"/>
265 <get src="http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar"
266 dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar"
267 usetimestamp="false"
268 ignoreerrors="true"/>
269 </target>
270
271 </project>