redline
redline copied to clipboard
Replace snapshots with a timestamp
When building with Maven, if the property ${project.version} is used as the package version and the version is actually a snapshot (with a -SNAPSHOT suffix), Redline throws the following error:
An Ant BuildException has occured: java.lang.IllegalArgumentException: version with value: '1.0-SNAPSHOT' contains illegal character -
It would be nice to automatically replace the -SNAPSHOT suffix with a timestamp instead, jdeb does this when building .deb packages.
It's possible to workaround the issue by replacing -SNAPSHOT with .SNAPSHOT:
<loadresource property="rpm.version">
<propertyresource name="project.version"/>
<filterchain>
<tokenfilter>
<filetokenizer/>
<replacestring from="-SNAPSHOT" to=".SNAPSHOT"/>
</tokenfilter>
</filterchain>
</loadresource>