Using the branch id in the version number will make it easier to
understand the relation between the source and the binary that it makes.
If you every want to know how developer X actually got the test to work
last month, it will be nice to be able to use the dependencies from his
project to find a POM and the rest of the sources that match up by GAV
and SCM branch id.
Ron
On 17/01/2011 9:02 AM, Ryan Connolly wrote:
Using a classifier MAY be appropriate for this use case.
On Jan 17, 2011 8:57 AM, "Lóránt Pintér"<[email protected]> wrote:
Hi,
I want to deploy alternate artifacts from my branches so that other
developers can depend on them. Say, I have a product called
<groupId>com.mycompany.tool</groupId>
<artifactId>tool</artifactId>
<version>5.2-SNAPSHOT</version>
Now, I'd like to create a branch of this one where I add a new feature.
And
this early adopter developer here wants to already build on my new
feature,
even before I merge it back to trunk, so I deploy my artifacts to Nexus.
Now, I obviously can't deploy them under the same GAV coordinates,
otherwise
they'd overwrite the ones generated from trunk. I can think of two
different
options:
1) Changing the version number
<groupId>com.mycompany.tool</groupId>
<artifactId>tool</artifactId>
<version>5.2-MYBRANCH-SNAPSHOT</version>
The good thing about this is that I can use the Versions plugin to set
change the version number even in a multi-module project. The bad thing is
that whenever a release happens on trunk, or when I merge the branch back
to
trunk, I get conflicts in all my POMs about the version number.
2) Changing the group ID
<groupId>com.mycompany.tool.mybranch</groupId>
<artifactId>tool</artifactId>
<version>5.2-SNAPSHOT</version>
This looks a bit better, but I can't use the versions plugin, and updating
the groupId in many places in a big multi-module project is quite
troublesome. Also, it doesn't seem correct semantically.
Do you have any advice on this?
Thanks,
Lorant
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]