You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kevin Burton <bu...@spinn3r.com> on 2015/01/19 03:12:28 UTC

Avoiding situations where duplicate classnames are imported?

It looks like I’ve accidentally ended up in a situation where I have
duplicate class names in separate .jars with different versions.

So I’ll have Foo.class in foo-1.0.0.jar and foo-3.0.0.jar …

Shouldn’t Maven fail in this scenario?  IE assert that you have conflicting
dependencies and that you should resolve them by hand.

This usually happens with two projects (usually an older one) depends on an
older version of a library.

I may be foolishly using a few older libs which, while stable, don’t really
work with some of their more modern dependencies.



-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>

Re: Avoiding situations where duplicate classnames are imported?

Posted by Ron Wheeler <rw...@artifact-software.com>.
If you use an IDE with Maven support it will tell you what version has 
been resolved by Maven and will show you the source(s) of the conflict 
in your transitive dependencies.

Eclipse/STS is free and includes m2e so you get this solved OOTB with no 
additional work required (besides opening the Dependency Hierarchy tab 
when reviewing your POM in the editor).

Ron

On 19/01/2015 1:31 AM, Adrien Rivard wrote:
> Hi,
>
> if youre artifacts have the same artifactId/groupId/type/classifier  it
> should'nt happen,Maven should pick only one of the two. If one of
> the artifactId/groupId/type/classifier is not the same, it could happen
> because it's not the same jar for maven.
>
>
> On Mon, Jan 19, 2015 at 4:32 AM, Steven Schlansker <
> stevenschlansker@gmail.com> wrote:
>
>> Check out
>> https://github.com/basepom/duplicate-finder-maven-plugin
>>
>> On Jan 18, 2015, at 6:12 PM, Kevin Burton <bu...@spinn3r.com> wrote:
>>
>>> It looks like I’ve accidentally ended up in a situation where I have
>>> duplicate class names in separate .jars with different versions.
>>>
>>> So I’ll have Foo.class in foo-1.0.0.jar and foo-3.0.0.jar …
>>>
>>> Shouldn’t Maven fail in this scenario?  IE assert that you have
>> conflicting
>>> dependencies and that you should resolve them by hand.
>>>
>>> This usually happens with two projects (usually an older one) depends on
>> an
>>> older version of a library.
>>>
>>> I may be foolishly using a few older libs which, while stable, don’t
>> really
>>> work with some of their more modern dependencies.
>>>
>>>
>>>
>>> --
>>>
>>> Founder/CEO Spinn3r.com
>>> Location: *San Francisco, CA*
>>> blog: http://burtonator.wordpress.com
>>> … or check out my Google+ profile
>>> <https://plus.google.com/102718274791889610666/posts>
>>> <http://spinn3r.com>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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


Re: Avoiding situations where duplicate classnames are imported?

Posted by Jason van Zyl <ja...@takari.io>.
The plugin Steven mentioned works better than anything I've seen for finding duplicates. All the Maven plugins that came originally from Ning and moved into Basepom are of good quality. It's not often I say something is good.

On Jan 20, 2015, at 8:19 AM, Curtis Rueden <ct...@wisc.edu> wrote:

> Hi Kevin,
> 
>> The main situation I see is when the artifact and group ID differ …
> 
> The Maven Enforcer Plugin is the "first party" plugin solution. The rule
> you want, banDuplicateClasses, is part of the Mojo project's Extra Enforcer
> Rules:
> 
> http://mojo.codehaus.org/extra-enforcer-rules/banDuplicateClasses.html
> 
> Regards,
> Curtis
> 
> On Mon, Jan 19, 2015 at 8:37 PM, Steven Schlansker <
> stevenschlansker@gmail.com> wrote:
> 
>> This is exactly the situation that the plugin I referenced resolves :)
>> https://github.com/basepom/duplicate-finder-maven-plugin
>> 
>> On Jan 19, 2015, at 8:47 AM, Adrien Rivard <ad...@gmail.com>
>> wrote:
>> 
>>> Then you need to explicitely exclude one of them. Eclipse can help for
>> that
>>> via the pom editor in the dependency Hierarchy tab.
>>> 
>>> On Mon, Jan 19, 2015 at 9:24 AM, Kevin Burton <bu...@spinn3r.com>
>> wrote:
>>> 
>>>> The main situation I see is when the artifact and group ID differ …
>>>> 
>>>> so  an older version of jdom used just jdom and the newer version used
>>>> org.jdom and then I ended up with both :)
>>>> 
>>>> On Sun, Jan 18, 2015 at 10:31 PM, Adrien Rivard <
>> adrien.rivard@gmail.com>
>>>> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> if youre artifacts have the same artifactId/groupId/type/classifier  it
>>>>> should'nt happen,Maven should pick only one of the two. If one of
>>>>> the artifactId/groupId/type/classifier is not the same, it could happen
>>>>> because it's not the same jar for maven.
>>>>> 
>>>>> 
>>>>> On Mon, Jan 19, 2015 at 4:32 AM, Steven Schlansker <
>>>>> stevenschlansker@gmail.com> wrote:
>>>>> 
>>>>>> Check out
>>>>>> https://github.com/basepom/duplicate-finder-maven-plugin
>>>>>> 
>>>>>> On Jan 18, 2015, at 6:12 PM, Kevin Burton <bu...@spinn3r.com> wrote:
>>>>>> 
>>>>>>> It looks like I’ve accidentally ended up in a situation where I have
>>>>>>> duplicate class names in separate .jars with different versions.
>>>>>>> 
>>>>>>> So I’ll have Foo.class in foo-1.0.0.jar and foo-3.0.0.jar …
>>>>>>> 
>>>>>>> Shouldn’t Maven fail in this scenario?  IE assert that you have
>>>>>> conflicting
>>>>>>> dependencies and that you should resolve them by hand.
>>>>>>> 
>>>>>>> This usually happens with two projects (usually an older one) depends
>>>>> on
>>>>>> an
>>>>>>> older version of a library.
>>>>>>> 
>>>>>>> I may be foolishly using a few older libs which, while stable, don’t
>>>>>> really
>>>>>>> work with some of their more modern dependencies.
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> 
>>>>>>> Founder/CEO Spinn3r.com
>>>>>>> Location: *San Francisco, CA*
>>>>>>> blog: http://burtonator.wordpress.com
>>>>>>> … or check out my Google+ profile
>>>>>>> <https://plus.google.com/102718274791889610666/posts>
>>>>>>> <http://spinn3r.com>
>>>>>> 
>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Adrien Rivard
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> 
>>>> Founder/CEO Spinn3r.com
>>>> Location: *San Francisco, CA*
>>>> blog: http://burtonator.wordpress.com
>>>> … or check out my Google+ profile
>>>> <https://plus.google.com/102718274791889610666/posts>
>>>> <http://spinn3r.com>
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Adrien Rivard
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

People develop abstractions by generalizing from concrete examples.
Every attempt to determine the correct abstraction on paper without
actually developing a running system is doomed to failure. No one
is that smart. A framework is a resuable design, so you develop it by
looking at the things it is supposed to be a design of. The more examples
you look at, the more general your framework will be.

  -- Ralph Johnson & Don Roberts, Patterns for Evolving Frameworks 













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


Re: Avoiding situations where duplicate classnames are imported?

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi Kevin,

> The main situation I see is when the artifact and group ID differ …

The Maven Enforcer Plugin is the "first party" plugin solution. The rule
you want, banDuplicateClasses, is part of the Mojo project's Extra Enforcer
Rules:

http://mojo.codehaus.org/extra-enforcer-rules/banDuplicateClasses.html

Regards,
Curtis

On Mon, Jan 19, 2015 at 8:37 PM, Steven Schlansker <
stevenschlansker@gmail.com> wrote:

> This is exactly the situation that the plugin I referenced resolves :)
> https://github.com/basepom/duplicate-finder-maven-plugin
>
> On Jan 19, 2015, at 8:47 AM, Adrien Rivard <ad...@gmail.com>
> wrote:
>
> > Then you need to explicitely exclude one of them. Eclipse can help for
> that
> > via the pom editor in the dependency Hierarchy tab.
> >
> > On Mon, Jan 19, 2015 at 9:24 AM, Kevin Burton <bu...@spinn3r.com>
> wrote:
> >
> >> The main situation I see is when the artifact and group ID differ …
> >>
> >> so  an older version of jdom used just jdom and the newer version used
> >> org.jdom and then I ended up with both :)
> >>
> >> On Sun, Jan 18, 2015 at 10:31 PM, Adrien Rivard <
> adrien.rivard@gmail.com>
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> if youre artifacts have the same artifactId/groupId/type/classifier  it
> >>> should'nt happen,Maven should pick only one of the two. If one of
> >>> the artifactId/groupId/type/classifier is not the same, it could happen
> >>> because it's not the same jar for maven.
> >>>
> >>>
> >>> On Mon, Jan 19, 2015 at 4:32 AM, Steven Schlansker <
> >>> stevenschlansker@gmail.com> wrote:
> >>>
> >>>> Check out
> >>>> https://github.com/basepom/duplicate-finder-maven-plugin
> >>>>
> >>>> On Jan 18, 2015, at 6:12 PM, Kevin Burton <bu...@spinn3r.com> wrote:
> >>>>
> >>>>> It looks like I’ve accidentally ended up in a situation where I have
> >>>>> duplicate class names in separate .jars with different versions.
> >>>>>
> >>>>> So I’ll have Foo.class in foo-1.0.0.jar and foo-3.0.0.jar …
> >>>>>
> >>>>> Shouldn’t Maven fail in this scenario?  IE assert that you have
> >>>> conflicting
> >>>>> dependencies and that you should resolve them by hand.
> >>>>>
> >>>>> This usually happens with two projects (usually an older one) depends
> >>> on
> >>>> an
> >>>>> older version of a library.
> >>>>>
> >>>>> I may be foolishly using a few older libs which, while stable, don’t
> >>>> really
> >>>>> work with some of their more modern dependencies.
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>>
> >>>>> Founder/CEO Spinn3r.com
> >>>>> Location: *San Francisco, CA*
> >>>>> blog: http://burtonator.wordpress.com
> >>>>> … or check out my Google+ profile
> >>>>> <https://plus.google.com/102718274791889610666/posts>
> >>>>> <http://spinn3r.com>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>>> For additional commands, e-mail: users-help@maven.apache.org
> >>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> Adrien Rivard
> >>>
> >>
> >>
> >>
> >> --
> >>
> >> Founder/CEO Spinn3r.com
> >> Location: *San Francisco, CA*
> >> blog: http://burtonator.wordpress.com
> >> … or check out my Google+ profile
> >> <https://plus.google.com/102718274791889610666/posts>
> >> <http://spinn3r.com>
> >>
> >
> >
> >
> > --
> > Adrien Rivard
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Avoiding situations where duplicate classnames are imported?

Posted by Steven Schlansker <st...@gmail.com>.
This is exactly the situation that the plugin I referenced resolves :)
https://github.com/basepom/duplicate-finder-maven-plugin

On Jan 19, 2015, at 8:47 AM, Adrien Rivard <ad...@gmail.com> wrote:

> Then you need to explicitely exclude one of them. Eclipse can help for that
> via the pom editor in the dependency Hierarchy tab.
> 
> On Mon, Jan 19, 2015 at 9:24 AM, Kevin Burton <bu...@spinn3r.com> wrote:
> 
>> The main situation I see is when the artifact and group ID differ …
>> 
>> so  an older version of jdom used just jdom and the newer version used
>> org.jdom and then I ended up with both :)
>> 
>> On Sun, Jan 18, 2015 at 10:31 PM, Adrien Rivard <ad...@gmail.com>
>> wrote:
>> 
>>> Hi,
>>> 
>>> if youre artifacts have the same artifactId/groupId/type/classifier  it
>>> should'nt happen,Maven should pick only one of the two. If one of
>>> the artifactId/groupId/type/classifier is not the same, it could happen
>>> because it's not the same jar for maven.
>>> 
>>> 
>>> On Mon, Jan 19, 2015 at 4:32 AM, Steven Schlansker <
>>> stevenschlansker@gmail.com> wrote:
>>> 
>>>> Check out
>>>> https://github.com/basepom/duplicate-finder-maven-plugin
>>>> 
>>>> On Jan 18, 2015, at 6:12 PM, Kevin Burton <bu...@spinn3r.com> wrote:
>>>> 
>>>>> It looks like I’ve accidentally ended up in a situation where I have
>>>>> duplicate class names in separate .jars with different versions.
>>>>> 
>>>>> So I’ll have Foo.class in foo-1.0.0.jar and foo-3.0.0.jar …
>>>>> 
>>>>> Shouldn’t Maven fail in this scenario?  IE assert that you have
>>>> conflicting
>>>>> dependencies and that you should resolve them by hand.
>>>>> 
>>>>> This usually happens with two projects (usually an older one) depends
>>> on
>>>> an
>>>>> older version of a library.
>>>>> 
>>>>> I may be foolishly using a few older libs which, while stable, don’t
>>>> really
>>>>> work with some of their more modern dependencies.
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> 
>>>>> Founder/CEO Spinn3r.com
>>>>> Location: *San Francisco, CA*
>>>>> blog: http://burtonator.wordpress.com
>>>>> … or check out my Google+ profile
>>>>> <https://plus.google.com/102718274791889610666/posts>
>>>>> <http://spinn3r.com>
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Adrien Rivard
>>> 
>> 
>> 
>> 
>> --
>> 
>> Founder/CEO Spinn3r.com
>> Location: *San Francisco, CA*
>> blog: http://burtonator.wordpress.com
>> … or check out my Google+ profile
>> <https://plus.google.com/102718274791889610666/posts>
>> <http://spinn3r.com>
>> 
> 
> 
> 
> -- 
> Adrien Rivard


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


Re: Avoiding situations where duplicate classnames are imported?

Posted by Adrien Rivard <ad...@gmail.com>.
Then you need to explicitely exclude one of them. Eclipse can help for that
via the pom editor in the dependency Hierarchy tab.

On Mon, Jan 19, 2015 at 9:24 AM, Kevin Burton <bu...@spinn3r.com> wrote:

> The main situation I see is when the artifact and group ID differ …
>
> so  an older version of jdom used just jdom and the newer version used
> org.jdom and then I ended up with both :)
>
> On Sun, Jan 18, 2015 at 10:31 PM, Adrien Rivard <ad...@gmail.com>
> wrote:
>
> > Hi,
> >
> > if youre artifacts have the same artifactId/groupId/type/classifier  it
> > should'nt happen,Maven should pick only one of the two. If one of
> > the artifactId/groupId/type/classifier is not the same, it could happen
> > because it's not the same jar for maven.
> >
> >
> > On Mon, Jan 19, 2015 at 4:32 AM, Steven Schlansker <
> > stevenschlansker@gmail.com> wrote:
> >
> > > Check out
> > > https://github.com/basepom/duplicate-finder-maven-plugin
> > >
> > > On Jan 18, 2015, at 6:12 PM, Kevin Burton <bu...@spinn3r.com> wrote:
> > >
> > > > It looks like I’ve accidentally ended up in a situation where I have
> > > > duplicate class names in separate .jars with different versions.
> > > >
> > > > So I’ll have Foo.class in foo-1.0.0.jar and foo-3.0.0.jar …
> > > >
> > > > Shouldn’t Maven fail in this scenario?  IE assert that you have
> > > conflicting
> > > > dependencies and that you should resolve them by hand.
> > > >
> > > > This usually happens with two projects (usually an older one) depends
> > on
> > > an
> > > > older version of a library.
> > > >
> > > > I may be foolishly using a few older libs which, while stable, don’t
> > > really
> > > > work with some of their more modern dependencies.
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Founder/CEO Spinn3r.com
> > > > Location: *San Francisco, CA*
> > > > blog: http://burtonator.wordpress.com
> > > > … or check out my Google+ profile
> > > > <https://plus.google.com/102718274791889610666/posts>
> > > > <http://spinn3r.com>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > Adrien Rivard
> >
>
>
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>
>



-- 
Adrien Rivard

Re: Avoiding situations where duplicate classnames are imported?

Posted by Ron Wheeler <rw...@artifact-software.com>.
That is trickier to find.
I don't think that my IDE will find that one!

Ron
On 19/01/2015 3:24 AM, Kevin Burton wrote:
> The main situation I see is when the artifact and group ID differ …
>
> so  an older version of jdom used just jdom and the newer version used
> org.jdom and then I ended up with both :)
>
> On Sun, Jan 18, 2015 at 10:31 PM, Adrien Rivard <ad...@gmail.com>
> wrote:
>
>> Hi,
>>
>> if youre artifacts have the same artifactId/groupId/type/classifier  it
>> should'nt happen,Maven should pick only one of the two. If one of
>> the artifactId/groupId/type/classifier is not the same, it could happen
>> because it's not the same jar for maven.
>>
>>
>> On Mon, Jan 19, 2015 at 4:32 AM, Steven Schlansker <
>> stevenschlansker@gmail.com> wrote:
>>
>>> Check out
>>> https://github.com/basepom/duplicate-finder-maven-plugin
>>>
>>> On Jan 18, 2015, at 6:12 PM, Kevin Burton <bu...@spinn3r.com> wrote:
>>>
>>>> It looks like I’ve accidentally ended up in a situation where I have
>>>> duplicate class names in separate .jars with different versions.
>>>>
>>>> So I’ll have Foo.class in foo-1.0.0.jar and foo-3.0.0.jar …
>>>>
>>>> Shouldn’t Maven fail in this scenario?  IE assert that you have
>>> conflicting
>>>> dependencies and that you should resolve them by hand.
>>>>
>>>> This usually happens with two projects (usually an older one) depends
>> on
>>> an
>>>> older version of a library.
>>>>
>>>> I may be foolishly using a few older libs which, while stable, don’t
>>> really
>>>> work with some of their more modern dependencies.
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Founder/CEO Spinn3r.com
>>>> Location: *San Francisco, CA*
>>>> blog: http://burtonator.wordpress.com
>>>> … or check out my Google+ profile
>>>> <https://plus.google.com/102718274791889610666/posts>
>>>> <http://spinn3r.com>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>> --
>> Adrien Rivard
>>
>
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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


Re: Avoiding situations where duplicate classnames are imported?

Posted by Doug Douglass <do...@gmail.com>.
On Mon, Jan 19, 2015 at 1:24 AM, Kevin Burton <bu...@spinn3r.com> wrote:

> The main situation I see is when the artifact and group ID differ …
>
> so  an older version of jdom used just jdom and the newer version used
> org.jdom and then I ended up with both :)
>
>
Kevin,

Specific to jdom, I don't believe any duplicate class checking will help
you here as the classes for JDOM 1.x are in different packages vs. JDOM
2.x. The upgrade path from 1.x to 2.x _requires_ code modification[1],
though I believe both versions can coexist (probably the reason for the
different artifact coordinates).

The most help I believe maven can provide you here is with exclusions
and/or the bannedDependencies[2] rule of the enforcer plugin.

HTH,
Doug

[1] https://github.com/hunterhacker/jdom/wiki/JDOM2-Migration-Issues
[2] http://maven.apache.org/enforcer/enforcer-rules/bannedDependencies.html

Re: Avoiding situations where duplicate classnames are imported?

Posted by Kevin Burton <bu...@spinn3r.com>.
The main situation I see is when the artifact and group ID differ …

so  an older version of jdom used just jdom and the newer version used
org.jdom and then I ended up with both :)

On Sun, Jan 18, 2015 at 10:31 PM, Adrien Rivard <ad...@gmail.com>
wrote:

> Hi,
>
> if youre artifacts have the same artifactId/groupId/type/classifier  it
> should'nt happen,Maven should pick only one of the two. If one of
> the artifactId/groupId/type/classifier is not the same, it could happen
> because it's not the same jar for maven.
>
>
> On Mon, Jan 19, 2015 at 4:32 AM, Steven Schlansker <
> stevenschlansker@gmail.com> wrote:
>
> > Check out
> > https://github.com/basepom/duplicate-finder-maven-plugin
> >
> > On Jan 18, 2015, at 6:12 PM, Kevin Burton <bu...@spinn3r.com> wrote:
> >
> > > It looks like I’ve accidentally ended up in a situation where I have
> > > duplicate class names in separate .jars with different versions.
> > >
> > > So I’ll have Foo.class in foo-1.0.0.jar and foo-3.0.0.jar …
> > >
> > > Shouldn’t Maven fail in this scenario?  IE assert that you have
> > conflicting
> > > dependencies and that you should resolve them by hand.
> > >
> > > This usually happens with two projects (usually an older one) depends
> on
> > an
> > > older version of a library.
> > >
> > > I may be foolishly using a few older libs which, while stable, don’t
> > really
> > > work with some of their more modern dependencies.
> > >
> > >
> > >
> > > --
> > >
> > > Founder/CEO Spinn3r.com
> > > Location: *San Francisco, CA*
> > > blog: http://burtonator.wordpress.com
> > > … or check out my Google+ profile
> > > <https://plus.google.com/102718274791889610666/posts>
> > > <http://spinn3r.com>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Adrien Rivard
>



-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>

Re: Avoiding situations where duplicate classnames are imported?

Posted by Adrien Rivard <ad...@gmail.com>.
Hi,

if youre artifacts have the same artifactId/groupId/type/classifier  it
should'nt happen,Maven should pick only one of the two. If one of
the artifactId/groupId/type/classifier is not the same, it could happen
because it's not the same jar for maven.


On Mon, Jan 19, 2015 at 4:32 AM, Steven Schlansker <
stevenschlansker@gmail.com> wrote:

> Check out
> https://github.com/basepom/duplicate-finder-maven-plugin
>
> On Jan 18, 2015, at 6:12 PM, Kevin Burton <bu...@spinn3r.com> wrote:
>
> > It looks like I’ve accidentally ended up in a situation where I have
> > duplicate class names in separate .jars with different versions.
> >
> > So I’ll have Foo.class in foo-1.0.0.jar and foo-3.0.0.jar …
> >
> > Shouldn’t Maven fail in this scenario?  IE assert that you have
> conflicting
> > dependencies and that you should resolve them by hand.
> >
> > This usually happens with two projects (usually an older one) depends on
> an
> > older version of a library.
> >
> > I may be foolishly using a few older libs which, while stable, don’t
> really
> > work with some of their more modern dependencies.
> >
> >
> >
> > --
> >
> > Founder/CEO Spinn3r.com
> > Location: *San Francisco, CA*
> > blog: http://burtonator.wordpress.com
> > … or check out my Google+ profile
> > <https://plus.google.com/102718274791889610666/posts>
> > <http://spinn3r.com>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Adrien Rivard

Re: Avoiding situations where duplicate classnames are imported?

Posted by Steven Schlansker <st...@gmail.com>.
Check out
https://github.com/basepom/duplicate-finder-maven-plugin

On Jan 18, 2015, at 6:12 PM, Kevin Burton <bu...@spinn3r.com> wrote:

> It looks like I’ve accidentally ended up in a situation where I have
> duplicate class names in separate .jars with different versions.
> 
> So I’ll have Foo.class in foo-1.0.0.jar and foo-3.0.0.jar …
> 
> Shouldn’t Maven fail in this scenario?  IE assert that you have conflicting
> dependencies and that you should resolve them by hand.
> 
> This usually happens with two projects (usually an older one) depends on an
> older version of a library.
> 
> I may be foolishly using a few older libs which, while stable, don’t really
> work with some of their more modern dependencies.
> 
> 
> 
> -- 
> 
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>


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