22
33 <description >
44 Sample ANT build script for a Spring Boot executable JAR project. Uses ivy for dependency management so run with
5- '$ ant -lib ivy-2.2.jar' (substitute the location of your actual ivy jar). Run with '$ java -jar target/*.jar'.
5+ '$ ant -lib ivy-2.2.jar' (substitute the location of your actual ivy jar). Run with '$ java -jar target/*.jar'.
66 </description >
77
88 <property name =" spring-boot.version" value =" 1.2.5.BUILD-SNAPSHOT" />
99 <property name =" start-class" value =" org.springframework.boot.sample.actuator.SampleActuatorApplication" />
10+ <property name =" lib.dir" location =" ${ basedir } /lib" />
1011
1112 <target name =" resolve" description =" --> retrieve dependencies with ivy" >
12- <ivy : retrieve pattern =" lib/[conf]/[artifact]-[type]-[revision].[ext]" />
13+ <ivy : retrieve pattern =" ${ lib.dir } /[conf]/[artifact]-[type]-[revision].[ext]" />
1314 </target >
1415
1516 <target name =" classpaths" depends =" resolve" >
1617 <path id =" compile.classpath" >
17- <fileset dir =" lib/compile" includes =" *.jar" />
18+ <fileset dir =" ${ lib.dir } /compile" includes =" *.jar" />
1819 </path >
1920 </target >
2021
3031 <delete dir =" target/classes" />
3132 </target >
3233
34+ <target name =" clean-all" description =" cleans all created files/dirs"
35+ depends =" clean" >
36+ <delete dir =" ${ lib.dir } " />
37+ </target >
38+
3339 <target name =" build" depends =" compile" >
3440 <copy todir =" target/classes/lib" >
35- <fileset dir =" lib/runtime" />
41+ <fileset dir =" ${ lib.dir } /runtime" />
3642 </copy >
3743 <jar destfile =" target/spring-boot-sample-actuator-${ spring-boot.version } .jar" compress =" false" >
3844 <fileset dir =" target/classes" />
3945 <fileset dir =" src/main/resources" />
40- <zipfileset src =" lib/loader/spring-boot-loader-jar-${ spring-boot.version } .jar" />
46+ <zipfileset src =" ${ lib.dir } /loader/spring-boot-loader-jar-${ spring-boot.version } .jar" />
4147 <manifest >
4248 <attribute name =" Main-Class" value =" org.springframework.boot.loader.JarLauncher" />
4349 <attribute name =" Start-Class" value =" ${ start-class } " />
4450 </manifest >
4551 </jar >
4652 </target >
4753
48- </project >
54+ </project >
0 commit comments