Fixup sample Ant build

Fixes gh-3324
pull/3885/head
Matt Benson 10 years ago committed by Phillip Webb
parent f8fdcc1312
commit 183a2095f4

@ -7,14 +7,15 @@
<property name="spring-boot.version" value="1.2.5.BUILD-SNAPSHOT" />
<property name="start-class" value="org.springframework.boot.sample.actuator.SampleActuatorApplication" />
<property name="lib.dir" location="${basedir}/lib" />
<target name="resolve" description="--> retrieve dependencies with ivy">
<ivy:retrieve pattern="lib/[conf]/[artifact]-[type]-[revision].[ext]" />
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[type]-[revision].[ext]" />
</target>
<target name="classpaths" depends="resolve">
<path id="compile.classpath">
<fileset dir="lib/compile" includes="*.jar" />
<fileset dir="${lib.dir}/compile" includes="*.jar" />
</path>
</target>
@ -30,14 +31,19 @@
<delete dir="target/classes" />
</target>
<target name="clean-all" description="cleans all created files/dirs"
depends="clean">
<delete dir="${lib.dir}" />
</target>
<target name="build" depends="compile">
<copy todir="target/classes/lib">
<fileset dir="lib/runtime" />
<fileset dir="${lib.dir}/runtime" />
</copy>
<jar destfile="target/spring-boot-sample-actuator-${spring-boot.version}.jar" compress="false">
<fileset dir="target/classes" />
<fileset dir="src/main/resources" />
<zipfileset src="lib/loader/spring-boot-loader-jar-${spring-boot.version}.jar" />
<zipfileset src="${lib.dir}/loader/spring-boot-loader-jar-${spring-boot.version}.jar" />
<manifest>
<attribute name="Main-Class" value="org.springframework.boot.loader.JarLauncher" />
<attribute name="Start-Class" value="${start-class}" />

@ -6,8 +6,8 @@
<conf name="runtime" extends="compile" description="everything needed to run this module" />
</configurations>
<dependencies>
<dependency org="org.springframework.boot" name="spring-boot-loader" rev="1.0.0.BUILD-SNAPSHOT" conf="loader->default" />
<dependency org="org.springframework.boot" name="spring-boot-starter-web" rev="1.0.0.BUILD-SNAPSHOT" conf="compile" />
<dependency org="org.springframework.boot" name="spring-boot-starter-actuator" rev="1.0.0.BUILD-SNAPSHOT" conf="runtime" />
<dependency org="org.springframework.boot" name="spring-boot-loader" rev="${spring-boot.version}" conf="loader->default" />
<dependency org="org.springframework.boot" name="spring-boot-starter-web" rev="${spring-boot.version}" conf="compile" />
<dependency org="org.springframework.boot" name="spring-boot-starter-actuator" rev="${spring-boot.version}" conf="compile->compile;runtime->runtime" />
</dependencies>
</ivy-module>

Loading…
Cancel
Save