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