Fix Ant builds following Maven updates

Update `spring-boot-sample-ant` so that it works with the CI friendly
Maven POMs.

See gh-9316
pull/10519/head
Phillip Webb 7 years ago
parent 2855010841
commit 041d8b39d0

@ -11,7 +11,7 @@
actual jars). Run with '$ java -jar target/*.jar'. actual jars). Run with '$ java -jar target/*.jar'.
</description> </description>
<property name="spring-boot.version" value="2.0.0.BUILD-SNAPSHOT" /> <property name="ant-spring-boot.version" value="${revision}" />
<property name="lib.dir" location="${basedir}/target/lib" /> <property name="lib.dir" location="${basedir}/target/lib" />
<property name="start-class" value="sample.ant.SampleAntApplication" /> <property name="start-class" value="sample.ant.SampleAntApplication" />
@ -38,7 +38,7 @@
</target> </target>
<target name="build" depends="compile"> <target name="build" depends="compile">
<spring-boot:exejar destfile="target/${ant.project.name}-${spring-boot.version}.jar" classes="target/classes"> <spring-boot:exejar destfile="target/${ant.project.name}-${ant-spring-boot.version}.jar" classes="target/classes">
<spring-boot:lib> <spring-boot:lib>
<fileset dir="${lib.dir}/runtime" /> <fileset dir="${lib.dir}/runtime" />
</spring-boot:lib> </spring-boot:lib>
@ -46,7 +46,7 @@
</target> </target>
<!-- Manual equivalent of the build target --> <!-- Manual equivalent of the build target -->
<target name="manual" depends="compile"> <target name="manual" depends="compile">
<jar destfile="target/${ant.project.name}-${spring-boot.version}.jar" compress="false"> <jar destfile="target/${ant.project.name}-${ant-spring-boot.version}.jar" compress="false">
<mappedresources> <mappedresources>
<fileset dir="target/classes" /> <fileset dir="target/classes" />
<globmapper from="*" to="BOOT-INF/classes/*"/> <globmapper from="*" to="BOOT-INF/classes/*"/>
@ -59,7 +59,7 @@
<fileset dir="${lib.dir}/runtime" /> <fileset dir="${lib.dir}/runtime" />
<globmapper from="*" to="BOOT-INF/lib/*"/> <globmapper from="*" to="BOOT-INF/lib/*"/>
</mappedresources> </mappedresources>
<zipfileset src="${lib.dir}/loader/spring-boot-loader-jar-${spring-boot.version}.jar" /> <zipfileset src="${lib.dir}/loader/spring-boot-loader-jar-${ant-spring-boot.version}.jar" />
<manifest> <manifest>
<attribute name="Main-Class" value="org.springframework.boot.loader.JarLauncher" /> <attribute name="Main-Class" value="org.springframework.boot.loader.JarLauncher" />
<attribute name="Start-Class" value="${start-class}" /> <attribute name="Start-Class" value="${start-class}" />

@ -6,7 +6,7 @@
<conf name="loader" description="Spring Boot loader used when manually building an executable archive" /> <conf name="loader" description="Spring Boot loader used when manually building an executable archive" />
</configurations> </configurations>
<dependencies> <dependencies>
<dependency org="org.springframework.boot" name="spring-boot-starter" rev="${spring-boot.version}" conf="compile" /> <dependency org="org.springframework.boot" name="spring-boot-starter" rev="${ant-spring-boot.version}" conf="compile" />
<dependency org="org.springframework.boot" name="spring-boot-loader" rev="${spring-boot.version}" conf="loader->default" /> <dependency org="org.springframework.boot" name="spring-boot-loader" rev="${ant-spring-boot.version}" conf="loader->default" />
</dependencies> </dependencies>
</ivy-module> </ivy-module>

@ -21,6 +21,10 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId> <artifactId>spring-boot-starter</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-loader</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>

Loading…
Cancel
Save