Gentoo Archives: gentoo-commits

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