> -----Original Message----- > From: Stephen Connolly [mailto:[email protected]] > Sent: Tuesday, January 14, 2014 3:10 PM > To: Maven Users List > Subject: Re: Is it possible to deliberately have two dependencies with the > same groupid, artifactid, and packaging, but different version? > > On 14 January 2014 22:49, KARR, DAVID <[email protected]> wrote: > > > > -----Original Message----- > > > From: Barrie Treloar [mailto:[email protected]] > > > Sent: Tuesday, January 14, 2014 2:23 PM > > > To: Maven Users List > > > Subject: Re: Is it possible to deliberately have two dependencies with > > the > > > same groupid, artifactid, and packaging, but different version? > > > > > > On 15 January 2014 01:40, KARR, DAVID <[email protected]> wrote: > > > > Again, I didn't want to debate whether this is "convenient", I just > > wanted > > > to know if Maven dependency resolution and things like the EAR plugin > > will > > > have any trouble incorporating multiple dependencies with the same G:A, > > but > > > different version. > > > > > > David, you've been on the list long enough to see the term "If you > > > fight Maven you will lose". > > > That way pain lies. > > > > I haven't heard anyone confirm conclusively that this will not work, so up > > to now it appears to just be an opinion that there's something wrong with > > this approach. > > > > Perhaps I just wasn't clear enough... > > Maven will resolve any list of dependencies so that there is a single > unique version of any GA. > > Where you have a maven does not bomb out when you double list a dependency, > you will get a single version. > > The correct parsing behaviour that Maven *should* follow is: > > * If the double dependency is in a project *being built* then fail the build > > * If the double dependency is in a dependency of the project being built, > then resolve to single version. > > AFAIK the only unknown I am aware of is whether the first case applies, but > in all cases that I am aware of you will only see one version of any GA
Ok, thanks for clarifying. I guess I'll plan on putting the version number into the artifact id string so the G:A will vary. > > I've also been writing software long enough to know that reality often > > makes theory irrelevant. > > > > > You will have much more joy solving the problem in a way that Maven helps > > > you. > > > > > > Does any of Stephen's response help out? > > > > I believe that's a different situation. > > > > There will be a new version of this artifact every single month such that > > multiple versions of the same artifact can and will be used at the same > > time (very soon we will be using 6 at the same time). It doesn't make > > sense to me to define a new group id or artifact id every month, > > considering the only difference between two names (and their contents) will > > simply be a number, representing its version number. If the only > > difference is the version, then it should be reflected in the version > > number, as that's the primary difference between them. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
