Baz, I would put this type of information into a profile within the pom. Then its simple and repeatable. Also trackable if your project is under source control, instead of just relying on people knowing the correct command line arguments to use.
Personally I think building a different version from what the pom says is a very bad idea as from my experience, definitively knowing from a file its artifact id and version number is a huge advantage. It can give you a link into a source control tag or label and maintenance and support effect can be more efficiently used. If a defect gets raised for version 0.1 how will support know its actually 1.0 with version 2.0 of xyz and not version 0.1 with what ever version of xyz was defined at the point. I apologise for the rant but I've been called in several times to help with issues with supporting non maven projects and finding out versions of jars being used and setting up a test environment took 85% of the time with the rest doing the actual fix and proving it works. Where as with a maven project, get the pom from the main jar and then sync to that tag/label and your setup in minuets not hours. John On 26/07/07, Baz <[EMAIL PROTECTED]> wrote:
All, How can i build a specific version or depend on specific version without changing the pom.xml ? For example, if pom.xml of product A is building version 1.0 of product A and depending on version 5.6 of xyz. Can i type something like "mvn -Dversion=0.1 -Dxyz_version=2.0 install" to build version 0.1 of product A and depending on version 2.0 of xyz? Thank you. A.
On 26/07/07, Baz <[EMAIL PROTECTED]> wrote:
All, How can i build a specific version or depend on specific version without changing the pom.xml ? For example, if pom.xml of product A is building version 1.0 of product A and depending on version 5.6 of xyz. Can i type something like "mvn -Dversion=0.1 -Dxyz_version=2.0 install" to build version 0.1 of product A and depending on version 2.0 of xyz? Thank you. A.