aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Hello.  Recently I've got acquainted with the release plugin. I started using it, it works great but Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Hello.  Recently I Watch "Hello.  Recently I New topic
Author

Hello. Recently I've got acquainted with the release plugin. I started using it, it works great but

Grigory O. Ptashko
Greenhorn

Joined: Jan 26, 2006
Posts: 16
Hello.

Recently I've got acquainted with the release plugin. I started using it, it works great but I am missing one feature. The problem is the following: the version that is specified in a POM is used not only in this POM but also in another place in a plain-text format. Actually it is used in the MANIFEST.MF in the special header. So when I perform a release the release version have the new version, the trunk version gets the new y-SNAPSHOT version but that MANIFEST.MF file has old version x-SNAPSHOT which becomes wrong both in trunk and in the release.

What I want is two steps to be executed while release:perform (phrases in quotes are taken from here http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html):

* The first is after the step "Change the version in the poms from x-SNAPSHOT to a new version (you will be prompted for the versions to use)": the same transformation must be done with the text file that I specify.
* The second is after the step "Bump the version in the POMs to a new value y-SNAPSHOT (these values will also be prompted for)": the same transformation must be done with text file that I specify.


How can I achieve this?

Thank you,
Grigory.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10213
    
166

The problem is the following: the version that is specified in a POM is used not only in this POM but also in another place in a plain-text format. Actually it is used in the MANIFEST.MF in the special header.


Why do you have a separate text file to maintain this? Maven by default, sets the correct version in the MANIFEST.MF of the jar. Looks like you have customized the plugins to set the version from this text file?


[My Blog] [JavaRanch Journal]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hello. Recently I've got acquainted with the release plugin. I started using it, it works great but