![]() |
The Spring Boot AntLib module provides basic Spring Boot support for Apache Ant. You can
use the module to create executable jars. To use the module, you need to declare an
additional <project xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:spring-boot="antlib:org.springframework.boot.ant" name="myapp" default="build"> ... </project> You need to remember to start Ant using the $ ant -lib <folder containing spring-boot-antlib-2.0.5.RELEASE.jar>
Once the You can use the
The following nested elements can be used with the task:
This section shows two examples of Ant tasks. Specify start-class. <spring-boot:exejar destfile="target/my-application.jar" classes="target/classes" start-class="com.example.MyApplication"> <resources> <fileset dir="src/main/resources" /> </resources> <lib> <fileset dir="lib" /> </lib> </spring-boot:exejar>
Detect start-class. <exejar destfile="target/my-application.jar" classes="target/classes"> <lib> <fileset dir="lib" /> </lib> </exejar>
The
This section contains three examples of using Find and log. <findmainclass classesroot="target/classes" />
Find and set. <findmainclass classesroot="target/classes" property="main-class" />
Override and set. <findmainclass mainclass="com.example.MainClass" property="main-class" />
|