Thank you all, enforcer rule is the way to go. I will put it at my company
top level pom and disable this rule at release time.

-Dan


On Sat, Feb 15, 2014 at 8:52 AM, Stephen Connolly <
[email protected]> wrote:

> Or filter commits where the log message starts with m-r-p's prefix
>
> On Saturday, 15 February 2014, Stuart McCulloch <[email protected]> wrote:
>
> > On 15 February 2014 15:51, Thomas Broyer <[email protected]
> <javascript:;>>
> > wrote:
> >
> > > On Sat, Feb 15, 2014 at 4:18 PM, Baptiste Mathus <[email protected]
> <javascript:;>
> > >
> > > wrote:
> > >
> > > > Hi Dan,
> > > > Not sure what you mean. You say "CI", are you taking about a specific
> > > > server? If Jenkins for example, wouldn't it then be more a Jenkins
> user
> > > ml
> > > > question?
> > > >
> > > > And I don't see how a snapshot build could interfere with another
> build
> > > > with a release version.
> > > > Could you give details about your issue so that we can help you?
> > > >
> > >
> > > mvn release:prepare does a first commit with the POM modified with the
> > > no-SNAPSHOT version, then another commit with the POM modified with the
> > > "next" SNAPSHOT version.
> > > If a build is triggered for the first commit and basically does a "mvn
> > > install" or, worse, a "mvn deploy", then it'll end up deploying your
> > > release version, the very same that "mvn release:perform" will deploy
> too
> > > (very same version information, not necessarily the same artifact:
> might
> > > not deploy javadoc and sources for example, or the artifact might be
> > > slightly different because you have plugins in a profile triggered only
> > on,
> > > or never on, release builds).
> > > I think that what Dan referred to as a "CI snapshot build" is the kind
> of
> > > build triggered by a commit (which generally builds snapshots).
> >
> >
> > Perhaps write a custom enforcer rule (enabled by a profile on CI) that
> > fails the build when the project artifact version is not a snapshot?
> >
> >
> > http://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html
> >
> > >
> > > > Cheers
> > > > Le 15 févr. 2014 07:01, "Dan Tran" <[email protected]<javascript:;>>
> > a écrit :
> > > >
> > > > > Hello
> > > > >
> > > > >
> > > > > It is possible that while release:prepare cutting the tag and CI
> for
> > > > > snapshot build wakeup at the same time.  Is there a way to prevent
> > > this?
> > > > > like a a profile to fail the build if the version happen to be a
> > > release
> > > > > version.  Ie is there a way to detect this in a profile?
> > > > >
> > > > > I currently have to keep remind my self to turn off CI snapshot
> build
> > > > while
> > > > > release is in progress, and too many to remember.
> > > > >
> > > > > Advice is greatly appreciated
> > > > >
> > > > > -Dan
> > > > >
> > > >
> > >
> > > --
> > > Thomas Broyer
> > > /tɔ.ma.bʁwa.je/ <http://xn--nna.ma.xn--bwa-xxb.je/> <
> http://xn--nna.ma.xn--bwa-xxb.je/> <
> > http://xn--nna.ma.xn--bwa-xxb.je/> <
> > > http://xn--nna.ma.xn--bwa-xxb.je/>
> > >
> >
> > --
> > Cheers, Stuart
> >
>
>
> --
> Sent from my phone
>

Reply via email to