You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by John Lussmyer <Jo...@amdocs.com> on 2011/03/11 19:56:42 UTC
Extra dependency added to eclipse projects
We have a large project hierarchy, and use "mvn eclipse:eclipse" to generate Eclipse projects for it.
In 3 of the projects, maven adds a dependency to "spring-2.0.3.jar" - which we don't use, and don't have.
This .jar does not appear in ANY of our pom.xml files.
"mvn dependency:tree" doesn't find any references to this jar either.
Any ideas on how to get rid of these added, annoying, unwanted, dependencies?
This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp
Re: Extra dependency added to eclipse projects
Posted by Jason Nerothin <ja...@gmail.com>.
Well, if project Jigsaw ever ships, the (Java) platform would provide
language-level support for some of this stuff. Oh! To say good-bye to the
classpath for once and for all! How sweet would that be?
On Wed, Mar 16, 2011 at 7:39 PM, Barrie Treloar <ba...@gmail.com> wrote:
> On Thu, Mar 17, 2011 at 12:37 AM, John Lussmyer <John.Lussmyer@amdocs.com
> >wrote:
>
> > So, Dependency Resolution has problems - and isn't that the whole REASON
> to
> > use Maven?
> > No wonder I keep wondering what the point of Maven is...
> >
>
> Dependency resolution is HARD. You only have to look at OSGi and SAT
> solving
> algorithms to see this stuff messes with your head.
>
> From my understanding, the core maven stuff does the resolution but its not
> exposed very well to allow other things (like dependency:tree and
> eclipse:eclipse) to re-use this logic.
>
> That's the problem we are suffering now.
>
Re: Extra dependency added to eclipse projects
Posted by Barrie Treloar <ba...@gmail.com>.
On Thu, Mar 17, 2011 at 12:37 AM, John Lussmyer <Jo...@amdocs.com>wrote:
> So, Dependency Resolution has problems - and isn't that the whole REASON to
> use Maven?
> No wonder I keep wondering what the point of Maven is...
>
Dependency resolution is HARD. You only have to look at OSGi and SAT solving
algorithms to see this stuff messes with your head.
>From my understanding, the core maven stuff does the resolution but its not
exposed very well to allow other things (like dependency:tree and
eclipse:eclipse) to re-use this logic.
That's the problem we are suffering now.
RE: Extra dependency added to eclipse projects
Posted by John Lussmyer <Jo...@amdocs.com>.
So, Dependency Resolution has problems - and isn't that the whole REASON to use Maven?
No wonder I keep wondering what the point of Maven is...
-----Original Message-----
From: Barrie Treloar [mailto:baerrach@gmail.com]
Sent: Tuesday, March 15, 2011 5:45 PM
To: Maven Users List
Cc: Dirk Olmes
Subject: Re: Extra dependency added to eclipse projects
On Tue, Mar 15, 2011 at 7:33 PM, Dirk Olmes <di...@xanthippe.ping.de> wrote:
> On 03/15/2011 05:45 AM, Jason Nerothin wrote:
> > I mean the following suggestion in all seriousness (because I think
> > it might work to help find your problem).
> >
> > 1. Download IntelliJ Idea 10, ultimate edition. You'll get a free 30
> > day trial.
>
> Great tip. But I'd really like to understand what it does different from
> e.g. dependency:tree. I encountered this kind of situation before,
> albeit with Maven 2.0.x and always wondered why dependency:tree and
> project-info-reports:dependencies come to different results.
>
>
Dependency resolution is a known short coming that is not easily isolated in
the code base and therefore not easily re-usable in a consistent manner.
I think that's being worked on in 3.0.
This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Extra dependency added to eclipse projects
Posted by Barrie Treloar <ba...@gmail.com>.
On Tue, Mar 15, 2011 at 7:33 PM, Dirk Olmes <di...@xanthippe.ping.de> wrote:
> On 03/15/2011 05:45 AM, Jason Nerothin wrote:
> > I mean the following suggestion in all seriousness (because I think
> > it might work to help find your problem).
> >
> > 1. Download IntelliJ Idea 10, ultimate edition. You'll get a free 30
> > day trial.
>
> Great tip. But I'd really like to understand what it does different from
> e.g. dependency:tree. I encountered this kind of situation before,
> albeit with Maven 2.0.x and always wondered why dependency:tree and
> project-info-reports:dependencies come to different results.
>
>
Dependency resolution is a known short coming that is not easily isolated in
the code base and therefore not easily re-usable in a consistent manner.
I think that's being worked on in 3.0.
Re: Extra dependency added to eclipse projects
Posted by Jason Nerothin <ja...@gmail.com>.
I'm guessing it is built on top of the dependencies plugin. The advantage it
gives you is that it's visual and easier to work with. There's no behind the
scenes magic: It's based purely upon what's in your pom(s). Sticks all your
deps into little boxes connected by arrows. JM2C
On Tue, Mar 15, 2011 at 4:03 AM, Dirk Olmes <di...@xanthippe.ping.de> wrote:
> On 03/15/2011 05:45 AM, Jason Nerothin wrote:
> > I mean the following suggestion in all seriousness (because I think
> > it might work to help find your problem).
> >
> > 1. Download IntelliJ Idea 10, ultimate edition. You'll get a free 30
> > day trial.
>
> Great tip. But I'd really like to understand what it does different from
> e.g. dependency:tree. I encountered this kind of situation before,
> albeit with Maven 2.0.x and always wondered why dependency:tree and
> project-info-reports:dependencies come to different results.
>
> -dirk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Extra dependency added to eclipse projects
Posted by Dirk Olmes <di...@xanthippe.ping.de>.
On 03/15/2011 05:45 AM, Jason Nerothin wrote:
> I mean the following suggestion in all seriousness (because I think
> it might work to help find your problem).
>
> 1. Download IntelliJ Idea 10, ultimate edition. You'll get a free 30
> day trial.
Great tip. But I'd really like to understand what it does different from
e.g. dependency:tree. I encountered this kind of situation before,
albeit with Maven 2.0.x and always wondered why dependency:tree and
project-info-reports:dependencies come to different results.
-dirk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Extra dependency added to eclipse projects
Posted by Jason Nerothin <ja...@gmail.com>.
I mean the following suggestion in all seriousness (because I think it might work to help find your problem).
1. Download IntelliJ Idea 10, ultimate edition. You'll get a free 30 day trial.
2. Copy your workspace to a new directory or (better yet) check it out from version control.
3. Start idea and New Project -> Import From External Model -> Maven -> point it at your top level pom (do NOT import from the eclipse model)
4. Open the maven widget on the top right. Select the top-level module (pom) or rinse-repeat through the following steps for each jar module:
a. Open up the dependencies section
b. If there are red squiggly lines anywhere, do the following:
c. Right-click -> jump to source (or F4)
d. Mouse to the bottom of the page, where there are two itty bitty tabs: text and [dependencies] (can't remember exactly). Click [dependencies]. Your first job is to remove all of the red lines from the graph.
e. Re-run dependency:list on your project or module frequently.
The reason for this advice is that, oftentimes, conflicting "transitive dependencies" slip in through other libraries you're using. The apache commons projects frequently reference different versions of commons-logging, for example. I have found that attempting such fix without great tool support is of the needle/haystack variety.
Removing undesired conflicts involves the following two-part algorithm:
1. Add an <exclude> directive to all or all-but-one-of the dependencies that are importing the unexpected spring deps.
2. Include the version you wish explicitly (with appropriate scope).
When you're finished, either uninstall-delete Idea or see if there are other features worth fiddling with. My other favorite is NeverCrashesAndSeldomNeedsARestart.
I'm guessing that one of the dependencies you are using hasn't bern tended to in a while and depends upon the ancient Spring. You'll probably see that as a red line in the dependency graph pretty quickly. I don't think it's Eclipse's fault (per se).
-- JPN --
Sent from my iPhone
On Mar 14, 2011, at 9:01 PM, Barrie Treloar <ba...@gmail.com> wrote:
> On Tue, Mar 15, 2011 at 1:34 AM, John Lussmyer <Jo...@amdocs.com>wrote:
>
>> So, I ran: mvn -X eclipse:eclipse
>> And sorted through the output.
>> There are NO occurrences of "spring-2.0.3". There are NO occurrences of
>> "2.0.3"
>>
>> We are using Spring 3.0.2 - Which is spread through a dozen jars, and
>> doesn't have a spring.jar.
>>
>
> I'm sorry, I can't offer much more help.
>
> This is the first I've heard of this type of issue.
>
> I recommend that you grab the source of the plugin (details here
> http://maven.apache.org/plugins/maven-eclipse-plugin/source-repository.html)
> and compile up your own version.
>
> Splatter some debug statements in around the dependency resolution and see
> if you can catch it that way.
> Check out
> org.apache.maven.plugin.ide.AbstractIdeSupportMojo.doDependencyResolution()
>
> Alternatively you can attempt to use another eclipse / maven integration
> like m2eclipse or sts.
>
> If you are able to reproduce the problem then we can look into getting it
> fixed.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Extra dependency added to eclipse projects
Posted by Barrie Treloar <ba...@gmail.com>.
On Tue, Mar 15, 2011 at 1:34 AM, John Lussmyer <Jo...@amdocs.com>wrote:
> So, I ran: mvn -X eclipse:eclipse
> And sorted through the output.
> There are NO occurrences of "spring-2.0.3". There are NO occurrences of
> "2.0.3"
>
> We are using Spring 3.0.2 - Which is spread through a dozen jars, and
> doesn't have a spring.jar.
>
I'm sorry, I can't offer much more help.
This is the first I've heard of this type of issue.
I recommend that you grab the source of the plugin (details here
http://maven.apache.org/plugins/maven-eclipse-plugin/source-repository.html)
and compile up your own version.
Splatter some debug statements in around the dependency resolution and see
if you can catch it that way.
Check out
org.apache.maven.plugin.ide.AbstractIdeSupportMojo.doDependencyResolution()
Alternatively you can attempt to use another eclipse / maven integration
like m2eclipse or sts.
If you are able to reproduce the problem then we can look into getting it
fixed.
RE: Extra dependency added to eclipse projects
Posted by John Lussmyer <Jo...@amdocs.com>.
So, I ran: mvn -X eclipse:eclipse
And sorted through the output.
There are NO occurrences of "spring-2.0.3". There are NO occurrences of "2.0.3"
We are using Spring 3.0.2 - Which is spread through a dozen jars, and doesn't have a spring.jar.
-----Original Message-----
From: Jörg Schaible [mailto:joerg.schaible@scalaris.com]
Sent: Monday, March 14, 2011 12:39 AM
To: users@maven.apache.org
Subject: Re: Extra dependency added to eclipse projects
Barrie Treloar wrote:
> On Sat, Mar 12, 2011 at 5:26 AM, John Lussmyer
> <Jo...@amdocs.com>wrote:
>
>> We have a large project hierarchy, and use "mvn eclipse:eclipse" to
>> generate Eclipse projects for it.
>> In 3 of the projects, maven adds a dependency to "spring-2.0.3.jar" -
>> which we don't use, and don't have.
>> This .jar does not appear in ANY of our pom.xml files.
>> "mvn dependency:tree" doesn't find any references to this jar either.
>>
>> Any ideas on how to get rid of these added, annoying, unwanted,
>> dependencies?
>>
>
> eclipse:eclipse doesn't make up dependencies, it must be in there
> somewhere.
>
> try using -X and wading though the console output, that should list spring
> and maybe you can see how it is included.
>
> It's odd that mvn dependency:tree doesn't find your dependency.
If he uses M3 then the output may be different to the real deps.
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp
Re: Extra dependency added to eclipse projects
Posted by Jörg Schaible <jo...@scalaris.com>.
Barrie Treloar wrote:
> On Sat, Mar 12, 2011 at 5:26 AM, John Lussmyer
> <Jo...@amdocs.com>wrote:
>
>> We have a large project hierarchy, and use "mvn eclipse:eclipse" to
>> generate Eclipse projects for it.
>> In 3 of the projects, maven adds a dependency to "spring-2.0.3.jar" -
>> which we don't use, and don't have.
>> This .jar does not appear in ANY of our pom.xml files.
>> "mvn dependency:tree" doesn't find any references to this jar either.
>>
>> Any ideas on how to get rid of these added, annoying, unwanted,
>> dependencies?
>>
>
> eclipse:eclipse doesn't make up dependencies, it must be in there
> somewhere.
>
> try using -X and wading though the console output, that should list spring
> and maybe you can see how it is included.
>
> It's odd that mvn dependency:tree doesn't find your dependency.
If he uses M3 then the output may be different to the real deps.
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Extra dependency added to eclipse projects
Posted by Barrie Treloar <ba...@gmail.com>.
On Sat, Mar 12, 2011 at 5:26 AM, John Lussmyer <Jo...@amdocs.com>wrote:
> We have a large project hierarchy, and use "mvn eclipse:eclipse" to
> generate Eclipse projects for it.
> In 3 of the projects, maven adds a dependency to "spring-2.0.3.jar" - which
> we don't use, and don't have.
> This .jar does not appear in ANY of our pom.xml files.
> "mvn dependency:tree" doesn't find any references to this jar either.
>
> Any ideas on how to get rid of these added, annoying, unwanted,
> dependencies?
>
eclipse:eclipse doesn't make up dependencies, it must be in there somewhere.
try using -X and wading though the console output, that should list spring
and maybe you can see how it is included.
It's odd that mvn dependency:tree doesn't find your dependency.
Re: Extra dependency added to eclipse projects
Posted by Barrie Treloar <ba...@gmail.com>.
On Sat, Mar 12, 2011 at 5:26 AM, John Lussmyer <Jo...@amdocs.com> wrote:
> We have a large project hierarchy, and use "mvn eclipse:eclipse" to generate Eclipse projects for it.
> In 3 of the projects, maven adds a dependency to "spring-2.0.3.jar" - which we don't use, and don't have.
> This .jar does not appear in ANY of our pom.xml files.
> "mvn dependency:tree" doesn't find any references to this jar either.
>
> Any ideas on how to get rid of these added, annoying, unwanted, dependencies?
John, have you made any discoveries on this?
If it's a problem in m-ecliose-p I want to get it fixed
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org