1 <?xml version="1.0" encoding="UTF-8"?>
3 <!-- ====================================================================== -->
4 <!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
5 <!-- ====================================================================== -->
7 <!-- ====================================================================== -->
8 <!-- ===================== - DO NOT EDIT THIS FILE! - ===================== -->
9 <!-- ====================================================================== -->
11 <!-- Any modifications will be overwritten. -->
13 <!-- Generated by Maven Ant Plugin on 7/13/13 1:12 PM -->
14 <!-- See: http://maven.apache.org/plugins/maven-ant-plugin/ -->
16 <!-- ====================================================================== -->
18 <project name="metainf-services-from-maven" default="package" basedir=".">
20 <!-- ====================================================================== -->
21 <!-- Build environment properties -->
22 <!-- ====================================================================== -->
24 <property file="${user.home}/.m2/maven.properties"/>
25 <property file="maven-build.properties"/>
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"/>
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"/>
42 <!-- ====================================================================== -->
43 <!-- Defining classpaths -->
44 <!-- ====================================================================== -->
46 <path id="build.classpath"/>
47 <path id="build.test.classpath"/>
49 <!-- ====================================================================== -->
50 <!-- Cleaning up target -->
51 <!-- ====================================================================== -->
53 <target name="clean" description="Clean the output directory">
54 <delete dir="${maven.build.dir}"/>
57 <!-- ====================================================================== -->
58 <!-- Compilation target -->
59 <!-- ====================================================================== -->
61 <target name="compile" depends="get-deps" description="Compile the code">
62 <mkdir dir="${maven.build.outputDir}"/>
63 <javac destdir="${maven.build.outputDir}"
73 <pathelement location="${maven.build.srcDir.0}"/>
75 <classpath refid="build.classpath"/>
77 <copy todir="${maven.build.outputDir}">
78 <fileset dir="${maven.build.resourceDir.0}"/>
82 <!-- ====================================================================== -->
83 <!-- Test-compilation target -->
84 <!-- ====================================================================== -->
86 <target name="compile-tests"
88 description="Compile the test code"
89 unless="maven.test.skip">
90 <mkdir dir="${maven.build.testOutputDir}"/>
93 <!-- ====================================================================== -->
94 <!-- Run all tests -->
95 <!-- ====================================================================== -->
98 depends="compile-tests, junit-missing"
99 unless="junit.skipped"
100 description="Run the test cases"/>
102 <target name="test-junit-present">
103 <available classname="junit.framework.Test" property="junit.present"/>
106 <target name="test-junit-status"
107 depends="test-junit-present">
108 <condition property="junit.missing">
110 <isfalse value="${junit.present}"/>
111 <isfalse value="${maven.test.skip}"/>
114 <condition property="junit.skipped">
116 <isfalse value="${junit.present}"/>
117 <istrue value="${maven.test.skip}"/>
122 <target name="junit-missing"
123 depends="test-junit-status"
125 <echo>=================================== WARNING ===================================</echo>
126 <echo> JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.</echo>
127 <echo>===============================================================================</echo>
130 <!-- ====================================================================== -->
131 <!-- Javadoc target -->
132 <!-- ====================================================================== -->
134 <target name="javadoc" description="Generates the Javadoc of the application">
135 <javadoc sourcepath="${maven.build.srcDir.0}"
137 destdir="${maven.reporting.outputDirectory}/apidocs"
146 nodeprecatedlist="false"
154 breakiterator="false"/>
157 <!-- ====================================================================== -->
158 <!-- Package target -->
159 <!-- ====================================================================== -->
161 <target name="package" depends="compile,test" description="Package the application">
162 <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar"
165 basedir="${maven.build.outputDir}"
166 excludes="**/package.html"/>
169 <!-- ====================================================================== -->
170 <!-- A dummy target for the package named after the type it creates -->
171 <!-- ====================================================================== -->
173 <target name="jar" depends="package" description="Builds the jar for the application"/>
175 <!-- ====================================================================== -->
176 <!-- Download dependencies target -->
177 <!-- ====================================================================== -->
179 <target name="test-offline">
180 <condition property="maven.mode.offline">
181 <equals arg1="${maven.settings.offline}" arg2="true"/>
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}"/>