dev-java/offo-hyphenation: Version bump.
[gentoo.git] / dev-java / metainf-services / files / metainf-services-1.5-build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!-- ====================================================================== -->
4 <!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above.        -->
5 <!-- ====================================================================== -->
6
7 <!-- ====================================================================== -->
8 <!-- ===================== - DO NOT EDIT THIS FILE! - ===================== -->
9 <!-- ====================================================================== -->
10 <!--                                                                        -->
11 <!-- Any modifications will be overwritten.                                 -->
12 <!--                                                                        -->
13 <!-- Generated by Maven Ant Plugin on 7/13/13 1:12 PM                       -->
14 <!-- See: http://maven.apache.org/plugins/maven-ant-plugin/                 -->
15 <!--                                                                        -->
16 <!-- ====================================================================== -->
17
18 <project name="metainf-services-from-maven" default="package" basedir=".">
19
20   <!-- ====================================================================== -->
21   <!-- Build environment properties                                           -->
22   <!-- ====================================================================== -->
23
24   <property file="${user.home}/.m2/maven.properties"/>
25   <property file="maven-build.properties"/>
26
27   <property name="maven.build.finalName" value="metainf-services-1.5"/>
28   <property name="maven.build.dir" value="target"/>
29   <property name="maven.build.outputDir" value="${maven.build.dir}/classes"/>
30   <property name="maven.build.srcDir.0" value="src/main/java"/>
31   <property name="maven.build.resourceDir.0" value="src/main/resources"/>
32   <property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes"/>
33   <property name="maven.build.testDir.0" value="src/test/java"/>
34   <property name="maven.build.testResourceDir.0" value="src/test/resources"/>
35   <property name="maven.test.reports" value="${maven.build.dir}/test-reports"/>
36   <property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/>
37
38   <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
39   <property name="maven.settings.offline" value="false"/>
40   <property name="maven.settings.interactiveMode" value="true"/>
41
42   <!-- ====================================================================== -->
43   <!-- Defining classpaths                                                    -->
44   <!-- ====================================================================== -->
45
46   <path id="build.classpath"/>
47   <path id="build.test.classpath"/>
48
49   <!-- ====================================================================== -->
50   <!-- Cleaning up target                                                     -->
51   <!-- ====================================================================== -->
52
53   <target name="clean" description="Clean the output directory">
54     <delete dir="${maven.build.dir}"/>
55   </target>
56
57   <!-- ====================================================================== -->
58   <!-- Compilation target                                                     -->
59   <!-- ====================================================================== -->
60
61   <target name="compile" depends="get-deps" description="Compile the code">
62     <mkdir dir="${maven.build.outputDir}"/>
63     <javac destdir="${maven.build.outputDir}" 
64            nowarn="false" 
65            debug="true" 
66            optimize="false" 
67            deprecation="true" 
68            target="1.6" 
69            verbose="false" 
70            fork="false" 
71            source="1.6">
72       <src>
73         <pathelement location="${maven.build.srcDir.0}"/>
74       </src>
75       <classpath refid="build.classpath"/>
76     </javac>
77     <copy todir="${maven.build.outputDir}">
78       <fileset dir="${maven.build.resourceDir.0}"/>
79     </copy>
80   </target>
81
82   <!-- ====================================================================== -->
83   <!-- Test-compilation target                                                -->
84   <!-- ====================================================================== -->
85
86   <target name="compile-tests" 
87           depends="compile" 
88           description="Compile the test code" 
89           unless="maven.test.skip">
90     <mkdir dir="${maven.build.testOutputDir}"/>
91   </target>
92
93   <!-- ====================================================================== -->
94   <!-- Run all tests                                                          -->
95   <!-- ====================================================================== -->
96
97   <target name="test" 
98           depends="compile-tests, junit-missing" 
99           unless="junit.skipped" 
100           description="Run the test cases"/>
101
102   <target name="test-junit-present">
103     <available classname="junit.framework.Test" property="junit.present"/>
104   </target>
105
106   <target name="test-junit-status" 
107           depends="test-junit-present">
108     <condition property="junit.missing">
109       <and>
110         <isfalse value="${junit.present}"/>
111         <isfalse value="${maven.test.skip}"/>
112       </and>
113     </condition>
114     <condition property="junit.skipped">
115       <or>
116         <isfalse value="${junit.present}"/>
117         <istrue value="${maven.test.skip}"/>
118       </or>
119     </condition>
120   </target>
121
122   <target name="junit-missing" 
123           depends="test-junit-status" 
124           if="junit.missing">
125     <echo>=================================== WARNING ===================================</echo>
126     <echo> JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.</echo>
127     <echo>===============================================================================</echo>
128   </target>
129
130   <!-- ====================================================================== -->
131   <!-- Javadoc target                                                         -->
132   <!-- ====================================================================== -->
133
134   <target name="javadoc" description="Generates the Javadoc of the application">
135     <javadoc sourcepath="${maven.build.srcDir.0}" 
136              packagenames="*" 
137              destdir="${maven.reporting.outputDirectory}/apidocs" 
138              access="protected" 
139              old="false" 
140              verbose="false" 
141              version="true" 
142              use="true" 
143              author="true" 
144              splitindex="false" 
145              nodeprecated="false" 
146              nodeprecatedlist="false" 
147              notree="false" 
148              noindex="false" 
149              nohelp="false" 
150              nonavbar="false" 
151              serialwarn="false" 
152              charset="ISO-8859-1" 
153              linksource="false" 
154              breakiterator="false"/>
155   </target>
156
157   <!-- ====================================================================== -->
158   <!-- Package target                                                         -->
159   <!-- ====================================================================== -->
160
161   <target name="package" depends="compile,test" description="Package the application">
162     <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar" 
163          compress="true" 
164          index="false" 
165          basedir="${maven.build.outputDir}" 
166          excludes="**/package.html"/>
167   </target>
168
169   <!-- ====================================================================== -->
170   <!-- A dummy target for the package named after the type it creates         -->
171   <!-- ====================================================================== -->
172
173   <target name="jar" depends="package" description="Builds the jar for the application"/>
174
175   <!-- ====================================================================== -->
176   <!-- Download dependencies target                                           -->
177   <!-- ====================================================================== -->
178
179   <target name="test-offline">
180     <condition property="maven.mode.offline">
181       <equals arg1="${maven.settings.offline}" arg2="true"/>
182     </condition>
183   </target>
184
185   <target name="get-deps" 
186           depends="test-offline" 
187           description="Download all dependencies" 
188           unless="maven.mode.offline">
189     <mkdir dir="${maven.repo.local}"/>
190   </target>
191
192 </project>