Make deploy script conditional on file existence

This commit is contained in:
Heliosares
2023-03-11 14:02:57 -05:00
parent 4b5d5a3395
commit de3ef25ee1

19
pom.xml
View File

@@ -48,11 +48,28 @@
<goal>run</goal>
</goals>
</execution>
<execution>
<id>check-deploy</id>
<phase>prepare-package</phase>
<configuration>
<target>
<available
file="${basedir}/deploy.bat"
property="fileExistsDeploy"
/>
</target>
<exportAntProperties>true</exportAntProperties>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>implement-jar</id>
<phase>package</phase>
<configuration>
<target>
<!--suppress UnresolvedMavenProperty -->
<target if="${fileExistsDeploy}">
<exec executable="cmd.exe" spawn="false">
<arg value="/c"/>
<arg value="${basedir}/deploy.bat"/>