Merge pull request #3324 from mbenson/actuator-sample-ant

* pr/3324:
  Fixup sample Ant build
pull/3885/head
Phillip Webb 10 years ago
commit 76348e50e6

@ -2,19 +2,20 @@
<description>
Sample ANT build script for a Spring Boot executable JAR project. Uses ivy for dependency management so run with
'$ ant -lib ivy-2.2.jar' (substitute the location of your actual ivy jar). Run with '$ java -jar target/*.jar'.
'$ ant -lib ivy-2.2.jar' (substitute the location of your actual ivy jar). Run with '$ java -jar target/*.jar'.
</description>
<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}" />
@ -45,4 +51,4 @@
</jar>
</target>
</project>
</project>

@ -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