Skip to content

Commit 76348e5

Browse files
committed
Merge pull request #3324 from mbenson/actuator-sample-ant
* pr/3324: Fixup sample Ant build
2 parents f8fdcc1 + 183a209 commit 76348e5

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

spring-boot-samples/spring-boot-sample-actuator/build.xml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
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

@@ -30,19 +31,24 @@
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>

spring-boot-samples/spring-boot-sample-actuator/ivy.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<conf name="runtime" extends="compile" description="everything needed to run this module" />
77
</configurations>
88
<dependencies>
9-
<dependency org="org.springframework.boot" name="spring-boot-loader" rev="1.0.0.BUILD-SNAPSHOT" conf="loader->default" />
10-
<dependency org="org.springframework.boot" name="spring-boot-starter-web" rev="1.0.0.BUILD-SNAPSHOT" conf="compile" />
11-
<dependency org="org.springframework.boot" name="spring-boot-starter-actuator" rev="1.0.0.BUILD-SNAPSHOT" conf="runtime" />
9+
<dependency org="org.springframework.boot" name="spring-boot-loader" rev="${spring-boot.version}" conf="loader->default" />
10+
<dependency org="org.springframework.boot" name="spring-boot-starter-web" rev="${spring-boot.version}" conf="compile" />
11+
<dependency org="org.springframework.boot" name="spring-boot-starter-actuator" rev="${spring-boot.version}" conf="compile->compile;runtime->runtime" />
1212
</dependencies>
1313
</ivy-module>

0 commit comments

Comments
 (0)