0

I have a project Maven ear modules, and i like to rename the ear from ProjectIt-4.1.0.ear to ProjectIt-4_1_0.ear in fact to have a version like that : x_y_z to resolve a deployement contraints

ᄂ ᄀ
  • 5,669
  • 6
  • 43
  • 57
Inforedaster
  • 1,260
  • 1
  • 23
  • 39

1 Answers1

0

You can define a custom property holding your key with your own separtor between major, minor and maintenance version. Then you can use that property in the build name of your artifact:

<project>
  ...
  <properties>
    <custom.version>x_y_z</custom.version>
  </properties>
  ...
  <build>
    <finalName>${project.artifactId}-${custom.version}</finalName>
  </build>
</project>

Meanwhile, I wouldn't advice such a method of shipping artifacts version, because it would not fit the common version syntax. You can read more about Semantic Versionin in semver.

tmarwen
  • 15,750
  • 5
  • 43
  • 62
  • Thank's for answer, but in this case i must update the version in every version increment :( – Inforedaster Oct 30 '14 at 08:53
  • Sure, that is why it would be better if you stick to the default schema. The release plugin won't be able to do the incrementation for you. – tmarwen Oct 30 '14 at 11:00