redline icon indicating copy to clipboard operation
redline copied to clipboard

Replace snapshots with a timestamp

Open ebourg opened this issue 6 years ago • 1 comments

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.

ebourg avatar Dec 09 '19 23:12 ebourg

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>

ebourg avatar Feb 14 '25 14:02 ebourg