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