You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by stanlick <st...@gmail.com> on 2009/03/03 20:00:11 UTC

Dependency question

Hey guys -- 

I am trying to build a tool for the lawyers that will reveal a dependency
tree of all downstream products necessary when considering adoption of an
open source product.  For the sake of illustration, I have created a simple
project with a single dependency on Struts 2.


<project ...
  <dependencies>
    <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts2-core</artifactId>
      <version>2.1.6</version>
   </dependency> 
  </dependencies>
</project>


I am running mvn dependency:tree and expecting a large dependency tree, when
in fact all I get is what you see below.  I *know* there are more
dependencies than this!  Can someone help me out with this flags and
switches please?

C:\Users\scott\MavenApps\appStats-app>mvn dependency:tree
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'dependency'.
[INFO]
------------------------------------------------------------------------
[INFO] Building appStats-app
[INFO]    task-segment: [dependency:tree]
[INFO]
------------------------------------------------------------------------
[INFO] [dependency:tree]
[INFO] com.acme.appStats:appStats-app:jar:1.0-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:test (scope not updated to compile)
[INFO] \- org.apache.struts:struts2-core:jar:2.1.6:compile
[INFO]    +- com.opensymphony:xwork:jar:2.1.2:compile
[INFO]    |  \- org.springframework:spring-test:jar:2.5.6:compile
[INFO]    |     \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO]    +- org.freemarker:freemarker:jar:2.3.13:compile
[INFO]    +- opensymphony:ognl:jar:2.6.11:compile
[INFO]    +- commons-fileupload:commons-fileupload:jar:1.2.1:compile
[INFO]    +- commons-io:commons-io:jar:1.3.2:compile
[INFO]    \- com.sun:tools:jar:1.5.0:system
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Tue Mar 03 12:57:53 CST 2009
[INFO] Final Memory: 10M/20M
[INFO]
------------------------------------------------------------------------

Peace,
Scott
-- 
View this message in context: http://www.nabble.com/Dependency-question-tp22315314p22315314.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Dependency question

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
The dependency:tree goal does show test dependencies by default.

-----Original Message-----
From: stanlick [mailto:stanlick@gmail.com] 
Sent: Wednesday, March 04, 2009 7:16 AM
To: users@maven.apache.org
Subject: Re: Dependency question


I hear you pal, but the lawyers are concentrating on the fact that the
archives are on our machine following a download of the full zip.  So do
you
think Maven might be able to report on them for the lawyers even though
they
are not "dependencies?"  

Peace,
Scott



Stephen Connolly-2 wrote:
> 
> Those dependencies are required to *test* struts.... they are not
required
> by your project as struts has already been tested.
> 
> -Stephen
> 
> 2009/3/3 stanlick <st...@gmail.com>
> 
>>
>> Thanks guys --
>>
>> If you look at the POM for Struts 2.1.6 there are many more
dependencies
>> than what show up running
>> dependency:resolve.  I verifies the default for scope because several
of
>> the
>> dependencies are "test."   It appears the default is all scopes, so I
am
>> wondering why I don't see them all when I run dependency:resolve.
>>
>> Peace,
>> Scott
>> - Show quoted text -
>>
>>
> 
> 

-- 
View this message in context:
http://www.nabble.com/Dependency-question-tp22315314p22328900.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


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


Re: Dependency question

Posted by Stephen Connolly <st...@gmail.com>.
You could write a plugin... it's not that hard

2009/3/4 stanlick <st...@gmail.com>

>
> I hear you pal, but the lawyers are concentrating on the fact that the
> archives are on our machine following a download of the full zip.  So do
> you
> think Maven might be able to report on them for the lawyers even though
> they
> are not "dependencies?"
>
> Peace,
> Scott
>
>
>
> Stephen Connolly-2 wrote:
> >
> > Those dependencies are required to *test* struts.... they are not
> required
> > by your project as struts has already been tested.
> >
> > -Stephen
> >
> > 2009/3/3 stanlick <st...@gmail.com>
> >
> >>
> >> Thanks guys --
> >>
> >> If you look at the POM for Struts 2.1.6 there are many more dependencies
> >> than what show up running
> >> dependency:resolve.  I verifies the default for scope because several of
> >> the
> >> dependencies are "test."   It appears the default is all scopes, so I am
> >> wondering why I don't see them all when I run dependency:resolve.
> >>
> >> Peace,
> >> Scott
> >> - Show quoted text -
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Dependency-question-tp22315314p22328900.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Dependency question

Posted by stanlick <st...@gmail.com>.
I hear you pal, but the lawyers are concentrating on the fact that the
archives are on our machine following a download of the full zip.  So do you
think Maven might be able to report on them for the lawyers even though they
are not "dependencies?"  

Peace,
Scott



Stephen Connolly-2 wrote:
> 
> Those dependencies are required to *test* struts.... they are not required
> by your project as struts has already been tested.
> 
> -Stephen
> 
> 2009/3/3 stanlick <st...@gmail.com>
> 
>>
>> Thanks guys --
>>
>> If you look at the POM for Struts 2.1.6 there are many more dependencies
>> than what show up running
>> dependency:resolve.  I verifies the default for scope because several of
>> the
>> dependencies are "test."   It appears the default is all scopes, so I am
>> wondering why I don't see them all when I run dependency:resolve.
>>
>> Peace,
>> Scott
>> - Show quoted text -
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Dependency-question-tp22315314p22328900.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Dependency question

Posted by Wayne Fay <wa...@gmail.com>.
> I realize that, but shouldn't they show up as dependencies even though they
> are only depended on during testing?

If you aren't building and testing Struts but merely using it, then
they aren't used, so no.

Wayne

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


Re: Dependency question

Posted by stanlick <st...@gmail.com>.
Thanks bro -- 

I realize that, but shouldn't they show up as dependencies even though they
are only depended on during testing?

Peace,
Scott


Stephen Connolly-2 wrote:
> 
> Those dependencies are required to *test* struts.... they are not required
> by your project as struts has already been tested.
> 
> -Stephen
> 
> 2009/3/3 stanlick <st...@gmail.com>
> 
>>
>> Thanks guys --
>>
>> If you look at the POM for Struts 2.1.6 there are many more dependencies
>> than what show up running
>> dependency:resolve.  I verifies the default for scope because several of
>> the
>> dependencies are "test."   It appears the default is all scopes, so I am
>> wondering why I don't see them all when I run dependency:resolve.
>>
>> Peace,
>> Scott
>> - Show quoted text -
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Dependency-question-tp22315314p22323314.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Dependency question

Posted by Stephen Connolly <st...@gmail.com>.
Those dependencies are required to *test* struts.... they are not required
by your project as struts has already been tested.

-Stephen

2009/3/3 stanlick <st...@gmail.com>

>
> Thanks guys --
>
> If you look at the POM for Struts 2.1.6 there are many more dependencies
> than what show up running
> dependency:resolve.  I verifies the default for scope because several of
> the
> dependencies are "test."   It appears the default is all scopes, so I am
> wondering why I don't see them all when I run dependency:resolve.
>
> Peace,
> Scott
> - Show quoted text -
>
>

RE: Dependency question

Posted by stanlick <st...@gmail.com>.
Thanks guys -- 

If you look at the POM for Struts 2.1.6 there are many more dependencies
than what show up running 
dependency:resolve.  I verifies the default for scope because several of the
dependencies are "test."   It appears the default is all scopes, so I am
wondering why I don't see them all when I run dependency:resolve.

Peace,
Scott


Brian E Fox wrote:
> 
> If every jar present in dependency:resolve is shown in the tree, then
> that's all folks.
> 
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com] 
> Sent: Tuesday, March 03, 2009 2:52 PM
> To: Maven Users List
> Subject: Re: Dependency question
> 
>> I am running mvn dependency:tree and expecting a large dependency tree,
>> when
>> in fact all I get is what you see below.  I *know* there are more
>> dependencies than this!  Can someone help me out with this flags and
>> switches please?
> 
> How do you *know* there are more dependencies? Have you tried with a
> sample pom of your own creation that has very well defined first,
> second, and third-level dependencies, to verify they all appear as you
> expect? That would be my test -- not a random Struts2 artifact.
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Dependency-question-tp22315314p22317335.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Dependency question

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
If every jar present in dependency:resolve is shown in the tree, then that's all folks.

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Tuesday, March 03, 2009 2:52 PM
To: Maven Users List
Subject: Re: Dependency question

> I am running mvn dependency:tree and expecting a large dependency tree, when
> in fact all I get is what you see below.  I *know* there are more
> dependencies than this!  Can someone help me out with this flags and
> switches please?

How do you *know* there are more dependencies? Have you tried with a
sample pom of your own creation that has very well defined first,
second, and third-level dependencies, to verify they all appear as you
expect? That would be my test -- not a random Struts2 artifact.

Wayne

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


Re: Dependency question

Posted by Wayne Fay <wa...@gmail.com>.
> I am running mvn dependency:tree and expecting a large dependency tree, when
> in fact all I get is what you see below.  I *know* there are more
> dependencies than this!  Can someone help me out with this flags and
> switches please?

How do you *know* there are more dependencies? Have you tried with a
sample pom of your own creation that has very well defined first,
second, and third-level dependencies, to verify they all appear as you
expect? That would be my test -- not a random Struts2 artifact.

Wayne

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