Skip to content

Commit 041d8b3

Browse files
committed
Fix Ant builds following Maven updates
Update `spring-boot-sample-ant` so that it works with the CI friendly Maven POMs. See gh-9316
1 parent 2855010 commit 041d8b3

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
actual jars). Run with '$ java -jar target/*.jar'.
1212
</description>
1313

14-
<property name="spring-boot.version" value="2.0.0.BUILD-SNAPSHOT" />
14+
<property name="ant-spring-boot.version" value="${revision}" />
1515
<property name="lib.dir" location="${basedir}/target/lib" />
1616
<property name="start-class" value="sample.ant.SampleAntApplication" />
1717

@@ -38,15 +38,15 @@
3838
</target>
3939

4040
<target name="build" depends="compile">
41-
<spring-boot:exejar destfile="target/${ant.project.name}-${spring-boot.version}.jar" classes="target/classes">
41+
<spring-boot:exejar destfile="target/${ant.project.name}-${ant-spring-boot.version}.jar" classes="target/classes">
4242
<spring-boot:lib>
4343
<fileset dir="${lib.dir}/runtime" />
4444
</spring-boot:lib>
4545
</spring-boot:exejar>
4646
</target>
4747
<!-- Manual equivalent of the build target -->
4848
<target name="manual" depends="compile">
49-
<jar destfile="target/${ant.project.name}-${spring-boot.version}.jar" compress="false">
49+
<jar destfile="target/${ant.project.name}-${ant-spring-boot.version}.jar" compress="false">
5050
<mappedresources>
5151
<fileset dir="target/classes" />
5252
<globmapper from="*" to="BOOT-INF/classes/*"/>
@@ -59,7 +59,7 @@
5959
<fileset dir="${lib.dir}/runtime" />
6060
<globmapper from="*" to="BOOT-INF/lib/*"/>
6161
</mappedresources>
62-
<zipfileset src="${lib.dir}/loader/spring-boot-loader-jar-${spring-boot.version}.jar" />
62+
<zipfileset src="${lib.dir}/loader/spring-boot-loader-jar-${ant-spring-boot.version}.jar" />
6363
<manifest>
6464
<attribute name="Main-Class" value="org.springframework.boot.loader.JarLauncher" />
6565
<attribute name="Start-Class" value="${start-class}" />

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<conf name="loader" description="Spring Boot loader used when manually building an executable archive" />
77
</configurations>
88
<dependencies>
9-
<dependency org="org.springframework.boot" name="spring-boot-starter" rev="${spring-boot.version}" conf="compile" />
10-
<dependency org="org.springframework.boot" name="spring-boot-loader" rev="${spring-boot.version}" conf="loader->default" />
9+
<dependency org="org.springframework.boot" name="spring-boot-starter" rev="${ant-spring-boot.version}" conf="compile" />
10+
<dependency org="org.springframework.boot" name="spring-boot-loader" rev="${ant-spring-boot.version}" conf="loader->default" />
1111
</dependencies>
1212
</ivy-module>

spring-boot-samples/spring-boot-sample-ant/pom.xml

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
<groupId>org.springframework.boot</groupId>
2222
<artifactId>spring-boot-starter</artifactId>
2323
</dependency>
24+
<dependency>
25+
<groupId>org.springframework.boot</groupId>
26+
<artifactId>spring-boot-loader</artifactId>
27+
</dependency>
2428
<dependency>
2529
<groupId>org.springframework.boot</groupId>
2630
<artifactId>spring-boot-starter-test</artifactId>

0 commit comments

Comments
 (0)