Adding a timestamp to our jar's causes our maven build to take ~4 times longer than usual. Timestamp is necessary for release builds, but we don't need it for snapshot builds. How would we configure the POM file to only add the TSA arguments when it is a Release version (i.e. SNAPSHOT does not appear in the project version).
Below is our POM entry for the jarsigner plugin. Note the arguments added at the bottom. We would like these to not be added if SNAPSHOT appears in the project version:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>sign webcontent jars</id>
<phase>prepare-package</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<archiveDirectory>${project.build.directory}/projectname-webcontent/applets</archiveDirectory>
<includes>
<include>*.jar</include>
</includes>
<keystore>Keystore</keystore>
<alias>alias</alias>
<storepass>pass</storepass>
<arguments>
<argument>-tsa</argument>
<argument>https://timestamp.geotrust.com/tsa</argument>
</arguments>
</configuration>
</plugin>