[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: Different behavior when building a project as a module or "stand-alone" Philippe Lagardère Tue Apr 03 03:00:11 2012

> Are you using a Maven repo such as Nexus?
> Can you not give your corporate libraries GAV designations that are
> controlled so the version numbers are monotonically increasing?

We do use a Maven repo, although we had to abandon Nexus in favor of

Originally, we used versions when deploying those corporate libraries, but
we didn't know how to automate the whole thing (namely, upgrading the
version numbers). The easiest I could come up with was antrun + external
properties files. This was considered going overboard for a basic use case,
so we abandoned that idea, in favor of using a single version.

There must be simpler ways to do this out there, but I did not manage to
find them.
Since there are no SCM interactions, release plugin didn't seem to fit. I
looked at a couple of third party plugins (this one, for instance :
http://mojo.codehaus.org/versions-maven-plugin/), but I couldn't find what I
was looking for. The solution might be right in front of me, but I can't
find it.

I'd appreciate a lot some pointers on this "issue". The problem I
encountered would probably be void if I was doing things right.

> I want to be sure that I understand what you are saying here. The
> versions are DIFFERENT each time you run deploy-file, right? It is a
> basic premise of Maven and most sane build systems that that a given
> artifact with a particular version number must be immutable. Otherwise
> you have no idea if your file versioned 2.3.2 is the "right one" vs
> another file with version 2.3.2 that exists somewhere else. 

This is a problem we failed to take into consideration. We are effectively
using a single, fixed version, which means there is only one jar/pom for
each of the corporate libraries managed this way. We acknowledged that this
was definitely not the intended way of managing libraries, but we didn't see
that one problem you pointed out. 
It is somewhat lessened by the fact that only one person updates these
libraries, and that my project is the only one to resolve these dependencies
from our Maven repository, but clearly, this will become problematic at some

As I mentionned above, these problem originate from the fact that I am not
managing these corporate libraries the way I should. I will revert to
manual, version enabled deployment for the time being, but I remain
extremely interested in automating the process (basically, how to
automatically increment the version using maven plugins, or something not
too far-fetched).

Any help on this matter will be greatly appreciated !


View this message in context: 
Sent from the Maven - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]