File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed
Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change 1111示例:
1212``` xml
1313<target name =" build" depends =" compile" >
14- <copy todir =" target/classes/lib" >
15- <fileset dir =" lib/runtime" />
16- </copy >
17- <jar destfile =" target/spring-boot-sample-actuator-${spring-boot.version}.jar" compress =" false" >
18- <fileset dir =" target/classes" />
19- <fileset dir =" src/main/resources" />
20- <zipfileset src =" lib/loader/spring-boot-loader-jar-${spring-boot.version}.jar" />
14+ <jar destfile =" target/${ant.project.name}-${spring-boot.version}.jar" compress =" false" >
15+ <mappedresources >
16+ <fileset dir =" target/classes" />
17+ <globmapper from =" *" to =" BOOT-INF/classes/*" />
18+ </mappedresources >
19+ <mappedresources >
20+ <fileset dir =" src/main/resources" erroronmissingdir =" false" />
21+ <globmapper from =" *" to =" BOOT-INF/classes/*" />
22+ </mappedresources >
23+ <mappedresources >
24+ <fileset dir =" ${lib.dir}/runtime" />
25+ <globmapper from =" *" to =" BOOT-INF/lib/*" />
26+ </mappedresources >
27+ <zipfileset src =" ${lib.dir}/loader/spring-boot-loader-jar-${spring-boot.version}.jar" />
2128 <manifest >
2229 <attribute name =" Main-Class" value =" org.springframework.boot.loader.JarLauncher" />
2330 <attribute name =" Start-Class" value =" ${start-class}" />
2431 </manifest >
2532 </jar >
2633</target >
2734```
28- 该Actuator示例中有一个build.xml文件 ,可以使用以下命令来运行:
35+ 该 [ Ant示例 ] ( https://github.com/spring-projects/spring-boot/tree/v1.4.1.RELEASE/spring-boot-samples/spring-boot-sample-ant ) 中有一个 ` build.xml ` 文件及 ` manual ` 任务 ,可以使用以下命令来运行:
2936``` shell
30- $ ant -lib < path_to > / ivy-2.2.jar
37+ $ ant -lib < folder containing ivy-2.2.jar> clean manual
3138```
3239在上述操作之后,你可以使用以下命令运行该应用:
3340``` shell
You can’t perform that action at this time.
0 commit comments