And use the Maven Release Plugin to create the branch[1][2] in the first place. This will change the version numbers back to snapshot.
[1] http://maven.apache.org/plugins/maven-release-plugin/branch-mojo.html [2] http://maven.apache.org/plugins/maven-release-plugin/examples/branch.html Hth, Nick Stolwijk ~Senior Java Developer~ iPROFS Wagenweg 208 2012 NM Haarlem T +31 23 547 6369 F +31 23 547 6370 I www.iprofs.nl On Wed, Jan 5, 2011 at 6:58 PM, Thiessen, Todd (Todd) <tthies...@avaya.com> wrote: > Configure your Nexus server to not allow artifacts to get overwritten. You > can't stop the build from happening, but you can stop the artifact from being > deployed. > >> -----Original Message----- >> From: baz themail [mailto:bazthem...@gmail.com] >> Sent: Wednesday, January 05, 2011 12:55 PM >> To: Maven Users List >> Subject: Re: Is there any way to stop the same version of pom file/build >> being built more than once? >> >> Wendy, thanks for your reply. >> >> Here is the example: >> >> 1. Someone need to fix a bug in production. >> 2. Create a new branch for bug fix based on a label. >> 3. The newly created branch will contain older pom files with older >> version that already released in Nexus (or any Maven based >> repository). >> 4. Logically, once the branch is created from an older label, in order >> to avoid redeploying the old version numbers, the version number >> should be changed. >> 5. Say, if #4 is skipped, then the same version number that exist in >> Nexus will be overwritten after performing a release build. >> 6. This is to assume that we should keep the old release version even >> if it is buggy. >> >> So, my question is: Is there any way to skip #4 by having some Maven >> type mechanism to check and stop a release build if the version >> already exist in maven repo? >> >> Thanks. >> >> B. >> >> On Tue, Jan 4, 2011 at 10:01 AM, Wendy Smoak <wsm...@gmail.com> wrote: >> > On Tue, Jan 4, 2011 at 12:28 PM, baz themail <bazthem...@gmail.com> >> wrote: >> >> Hi, >> >> Is there any way to stop the same version of pom file/build being >> >> built more than once? >> > >> > Being _built_? Probably not... anyone can check out a tag and >> > re-build that version locally, nothing to prevent that from happening. >> > (Nor should there be.) >> > >> > What's the real underlying problem? >> > >> > My guess is that it's about not overwriting released versions. In >> > which case... are you using -SNAPSHOT version numbers and going >> > through a release process? A repository manager to store your >> > artifacts? >> > >> > Tell us more about your situation and most likely someone will have >> > some advice for you. >> > >> > -- >> > Wendy >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> > For additional commands, e-mail: users-h...@maven.apache.org >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org