forked from spring-projects/spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic build.xml to actuator sample
$ ant -lib ivy-2.2.jar (substitute the location of your actual ivy jar) $ java -jar target/*.jar Fixes spring-projectsgh-140
- Loading branch information
Dave Syer
committed
Dec 23, 2013
1 parent
8e2a6ee
commit f5ad4be
Showing
5 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
.settings | ||
bin | ||
build | ||
lib/ | ||
target | ||
.springBeans | ||
dependency-reduced-pom.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="spring-boot-sample-actuator" default="build"> | ||
|
||
<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'. | ||
</description> | ||
|
||
<property name="spring-boot.version" value="0.5.0.BUILD-SNAPSHOT" /> | ||
<property name="start-class" value="org.springframework.boot.sample.actuator.SampleActuatorApplication" /> | ||
|
||
<target name="resolve" description="--> retrieve dependencies with ivy"> | ||
<ivy:retrieve pattern="lib/[conf]/[artifact]-[type]-[revision].[ext]" /> | ||
</target> | ||
|
||
<target name="classpaths" depends="resolve"> | ||
<path id="compile.classpath"> | ||
<fileset dir="lib/compile" includes="*.jar" /> | ||
</path> | ||
</target> | ||
|
||
<target name="init" depends="classpaths"> | ||
<mkdir dir="target/classes" /> | ||
</target> | ||
|
||
<target name="compile" depends="init" description="compile"> | ||
<javac srcdir="src/main/java" destdir="target/classes" classpathref="compile.classpath" /> | ||
</target> | ||
|
||
<target name="clean" description="cleans all class files"> | ||
<delete dir="target/classes" /> | ||
</target> | ||
|
||
<target name="build" depends="compile"> | ||
<copy todir="target/classes/lib"> | ||
<fileset dir="lib/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" /> | ||
<manifest> | ||
<attribute name="Main-Class" value="org.springframework.boot.loader.JarLauncher" /> | ||
<attribute name="Start-Class" value="${start-class}" /> | ||
</manifest> | ||
</jar> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<ivy-module version="2.0"> | ||
<info organisation="org.springframework.boot" module="spring-boot-sample-actuator"/> | ||
<configurations> | ||
<conf name="loader" description="helpers added to final jar" /> | ||
<conf name="compile" description="everything needed to compile this module" /> | ||
<conf name="runtime" extends="compile" description="everything needed to run this module" /> | ||
</configurations> | ||
<dependencies> | ||
<dependency org="org.springframework.boot" name="spring-boot-loader" rev="0.5.0.BUILD-SNAPSHOT" conf="loader->default"/> | ||
<dependency org="org.springframework.boot" name="spring-boot-starter-web" rev="0.5.0.BUILD-SNAPSHOT" conf="compile"/> | ||
<dependency org="org.springframework.boot" name="spring-boot-starter-actuator" rev="0.5.0.BUILD-SNAPSHOT" conf="runtime"/> | ||
</dependencies> | ||
</ivy-module> |
16 changes: 16 additions & 0 deletions
16
spring-boot-samples/spring-boot-sample-actuator/ivysettings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<ivysettings> | ||
<settings defaultResolver="chain"/> | ||
<resolvers> | ||
<chain name="chain"> | ||
<filesystem name="local" local="true" m2compatible="true"> | ||
<artifact | ||
pattern="${user.home}/.m2/[organisation]/[module]/[revision]/[module]-[revision].[ext]" /> | ||
<ivy | ||
pattern="${user.home}/.m2/[organisation]/[module]/[revision]/[module]-[revision].pom" /> | ||
</filesystem> | ||
<ibiblio name="ibiblio" m2compatible="true" /> | ||
<ibiblio name="spring-milestones" m2compatible="true" root="http://repo.spring.io/libs-milestone"/> | ||
<ibiblio name="spring-snapshots" m2compatible="true" root="http://repo.spring.io/libs-snapshot"/> | ||
</chain> | ||
</resolvers> | ||
</ivysettings> |