Clean ant lib folder before build

Update `spring-boot-smoke-test-ant` so that the ant lib folder is always
cleaned. Prior to this commit, it was possible for the folder to contain
stale artifacts.
This commit is contained in:
Phillip Webb 2022-12-21 22:23:13 -08:00
parent e8e56dbb11
commit 816728186a
2 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,7 @@ task antRun(type: JavaExec) {
dependsOn syncTestRepository, configurations.antDependencies
classpath = configurations.antDependencies;
main = "org.apache.tools.ant.launch.Launcher"
args = [ "clean", "build" ]
systemProperties = [
"ant-spring-boot.version" : version,
"projectDir": project.layout.projectDirectory

View File

@ -38,6 +38,7 @@
<target name="clean" description="cleans all created files/dirs">
<delete dir="target" />
<delete dir="${lib.dir}" />
</target>
<target name="build" depends="compile">
@ -48,6 +49,7 @@
</spring-boot:lib>
</spring-boot:exejar>
</target>
<!-- Manual equivalent of the build target -->
<target name="manual" depends="compile">
<jar destfile="target/${ant.project.name}-${ant-spring-boot.version}.jar" compress="false">