maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curtis Rueden <ctrue...@wisc.edu>
Subject Re: Is it possible to deliberately have two dependencies with the same groupid, artifactid, and packaging, but different version?
Date Tue, 14 Jan 2014 15:20:09 GMT
Hi David,

> 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.

I haven't tried it, but personally I would be shocked if Maven allowed this
at all. Did you try it? Does it work?

IMO, the major reason for versions is so that Maven (and humans) knows to
select one from a set. If you need more than one at the same time, change
the value of A.

Including multiple versions of the same artifact violates Maven's current
assumptions rather severely.

Regards,
Curtis


On Tue, Jan 14, 2014 at 9:10 AM, KARR, DAVID <dk068x@att.com> wrote:

> > -----Original Message-----
> > From: Barrie Treloar [mailto:baerrach@gmail.com]
> > Sent: Monday, January 13, 2014 4:48 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 10:54, KARR, DAVID <dk068x@att.com> wrote:
> > > I have a situation where it would be convenient for my pom to have two
> > dependencies that are almost identical, only being different by the
> version.
> > The makeup of the artifact is such that it would be safe (and intended)
> to
> > use both of them.  The Java package used in each is similar, but
> different.
> > The package will vary along with the version number.
> > >
> > > Will dependency resolution and the EAR plugin (and any other mechanism
> that
> > lists dependencies) have any trouble with this?
> >
> > Can you describe why you think this would be convenient?
> > Have you looked at classifiers?
> > http://stackoverflow.com/questions/8040964/how-to-use-or-abuse-artifact-
> > classifiers-in-maven
>
> A new version of this artifact is produced perhaps once a month.  Perhaps
> 2-3 versions of this artifact will be referenced in the client code base at
> one time.  More versions than that are supported in the server code base,
> throughout all environments.  The only difference in the reported name of
> this artifact from one version to the next is the version number.
>
> 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.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message