2
2
3
3
<description >
4
4
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'.
6
6
</description >
7
7
8
8
<property name =" spring-boot.version" value =" 1.2.5.BUILD-SNAPSHOT" />
9
9
<property name =" start-class" value =" org.springframework.boot.sample.actuator.SampleActuatorApplication" />
10
+ <property name =" lib.dir" location =" ${ basedir } /lib" />
10
11
11
12
<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]" />
13
14
</target >
14
15
15
16
<target name =" classpaths" depends =" resolve" >
16
17
<path id =" compile.classpath" >
17
- <fileset dir =" lib/compile" includes =" *.jar" />
18
+ <fileset dir =" ${ lib.dir } /compile" includes =" *.jar" />
18
19
</path >
19
20
</target >
20
21
30
31
<delete dir =" target/classes" />
31
32
</target >
32
33
34
+ <target name =" clean-all" description =" cleans all created files/dirs"
35
+ depends =" clean" >
36
+ <delete dir =" ${ lib.dir } " />
37
+ </target >
38
+
33
39
<target name =" build" depends =" compile" >
34
40
<copy todir =" target/classes/lib" >
35
- <fileset dir =" lib/runtime" />
41
+ <fileset dir =" ${ lib.dir } /runtime" />
36
42
</copy >
37
43
<jar destfile =" target/spring-boot-sample-actuator-${ spring-boot.version } .jar" compress =" false" >
38
44
<fileset dir =" target/classes" />
39
45
<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" />
41
47
<manifest >
42
48
<attribute name =" Main-Class" value =" org.springframework.boot.loader.JarLauncher" />
43
49
<attribute name =" Start-Class" value =" ${ start-class } " />
44
50
</manifest >
45
51
</jar >
46
52
</target >
47
53
48
- </project >
54
+ </project >
0 commit comments