I just glanced through the current article but I suspect that this doesn’t work 
with POMs that have parent references where the version is the same as the 
project (e.g., the parent is the aggregate POM in the directory above each 
module).  

In my current projects, I would only have a single version number in the 
top-level POM if it weren't for the parent references in the submodule POMs.  
As far as I can tell, Maven will not accept a variable for a parent POM 
reference version number.  Unless this issue is resolved, it will be hard to 
use this technique for any complex projects.

I can tell you first-hand that deleting thousands of old build versions IS a 
nightmare.  That's why we are using SNAPSHOTs and only switch to version 
numbers for end of sprint builds.


-----Original Message-----
From: Dan Tran [mailto:dant...@gmail.com] 
Sent: Thursday, April 21, 2016 9:17 PM
To: Maven Users List
Subject: Re: Maven and Continous Integration / Continous Delivery

the big issue with that technique is that the pom deployed to maven repo, its 
version is the real version, will be maintaining nightmare

-D

On Wed, Apr 20, 2016 at 2:17 AM, Francois-Xavier Bonnet < 
francois-xavier.bon...@centraliens.net> wrote:

> Maybe this article could help:
> https://axelfontaine.com/blog/dead-burried.html
>
> 2016-04-20 11:07 GMT+02:00 Hohl, Gerrit <g.h...@aurenz.de>:
>
> > Hello everyone, :-)
> >
> >
> >
> > I'm currently sitting on the book "Continuous Delivery" written by 
> > Jez Humble and David Farley.
> >
> > They write that each build is a potential release candidate. And 
> > each build should be triggered by the check-in into the SCM.
> >
> > So far, so good. But how do I realize that in Maven?
> >
> > Up until now the version number in our Maven projects and modules 
> > have been static. If it had to be changed the developer had to 
> > perform that step.
> >
> > But if the CI server performs the build as well as putting the 
> > result into the repository (in our case Nexus), the resulting 
> > artifacts have to include the build number in some way. Otherwise I 
> > overwrite the same artifact other and other again until a developer 
> > changes the version in the POM file. Depending projects then will 
> > see only the last version of the artifact and builds won't be 
> > repeatable (means the functionality of the artifact changes without anyone 
> > noticing it).
> >
> > One way would be to modify the POM between the check-out from the 
> > SCM and the Maven build process and writing the build number into it.
> >
> > But then I will have the problem in the IDE that it don't understand 
> > that the current version I've checked-out is the version I have 
> > referred on in another project I've checked-out.
> >
> > If the CI server checks-in the changed POM file afterwards it will 
> > trigger the next build. Also it will cause problems if the POM was 
> > changed in the SCM in the meantime as the CI maybe can't merge it.
> >
> >
> >
> > Anyone solved that problem?
> >
> >
> >
> > Regards,
> >
> > Gerrit
> >
> >
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to