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