You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by j_develop89 <ma...@gmail.com> on 2009/12/08 18:35:22 UTC

Dependency SCope

HI All

I have 2 Maven subprojects. The first subporject's pom.xml has a dependency
with scope set to provided. The second subporject's pom.xml has the same
dependency with no scope set. What does Maven do in such a situtation.

Thank YOu
-- 
View this message in context: http://old.nabble.com/Dependency-SCope-tp26697571p26697571.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 SCope

Posted by Wayne Fay <wa...@gmail.com>.
> I have 2 Maven subprojects. The first subporject's pom.xml has a dependency
> with scope set to provided. The second subporject's pom.xml has the same
> dependency with no scope set. What does Maven do in such a situtation.

When you tried building your projects, what happens, and how does that
conflict with what you were expecting?

This list works better when you have specific problems you are trying
to diagnose/resolve rather than simply answering trivia that you can
easily test on your own or read about in various online resources. No
scope = default = compile scope, unless scope is declared in depMgmt
etc.

Wayne

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


RE: Dependency SCope

Posted by Todd Thiessen <th...@nortel.com>.
Your question isn't really clear. Perhaps what you are observing is that
provided dependencies are not transtive.  So, if you have three
projects:

A -provided-> B -compile-> C

where project A has a provided dependency on project B. Project B has a
compile dependency on project C.

Project C's artifact is not downloaded when project A is built.

This is a good place to start.


---
Todd Thiessen
 

> -----Original Message-----
> From: j_develop89 [mailto:mansoor.akthar@gmail.com] 
> Sent: Tuesday, December 08, 2009 1:01 PM
> To: users@maven.apache.org
> Subject: Re: Dependency SCope
> 
> 
> HI
> 
> Thank You for the quick response. The result was that the 
> dependency's jar file is not downloaded by maven to the 
> project. So does this mean the scope provided overrides the 
> scope compile.
> 
> Thank You
> 
> 
> 
> j_develop89 wrote:
> > 
> > HI All
> > 
> > I have 2 Maven subprojects. The first subporject's pom.xml has a 
> > dependency with scope set to provided. The second 
> subporject's pom.xml 
> > has the same dependency with no scope set. What does Maven 
> do in such 
> > a situtation.
> > 
> > Thank YOu
> > 
> 
> --
> View this message in context: 
> http://old.nabble.com/Dependency-SCope-tp26697571p26697958.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 SCope

Posted by Todd Thiessen <th...@nortel.com>.
And... the link ;-)

http://maven.apache.org/guides/introduction/introduction-to-dependency-m
echanism.html

---
Todd Thiessen
 

> -----Original Message-----
> From: Thiessen, Todd (BVW:9T16) 
> Sent: Tuesday, December 08, 2009 1:12 PM
> To: 'Maven Users List'
> Subject: RE: Dependency SCope
> 
> Your question isn't really clear. Perhaps what you are 
> observing is that provided dependencies are not transtive.  
> So, if you have three projects:
> 
> A -provided-> B -compile-> C
> 
> where project A has a provided dependency on project B. 
> Project B has a compile dependency on project C.
> 
> Project C's artifact is not downloaded when project A is built.
> 
> This is a good place to start.
> 
> 
> ---
> Todd Thiessen
>  
> 
> > -----Original Message-----
> > From: j_develop89 [mailto:mansoor.akthar@gmail.com]
> > Sent: Tuesday, December 08, 2009 1:01 PM
> > To: users@maven.apache.org
> > Subject: Re: Dependency SCope
> > 
> > 
> > HI
> > 
> > Thank You for the quick response. The result was that the 
> dependency's 
> > jar file is not downloaded by maven to the project. So does 
> this mean 
> > the scope provided overrides the scope compile.
> > 
> > Thank You
> > 
> > 
> > 
> > j_develop89 wrote:
> > > 
> > > HI All
> > > 
> > > I have 2 Maven subprojects. The first subporject's pom.xml has a 
> > > dependency with scope set to provided. The second
> > subporject's pom.xml
> > > has the same dependency with no scope set. What does Maven
> > do in such
> > > a situtation.
> > > 
> > > Thank YOu
> > > 
> > 
> > --
> > View this message in context: 
> > http://old.nabble.com/Dependency-SCope-tp26697571p26697958.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 SCope

Posted by j_develop89 <ma...@gmail.com>.
HI

Thank You for the quick response. The result was that the dependency's jar
file is not downloaded by maven to the project. So does this mean the scope
provided overrides the scope compile.

Thank You



j_develop89 wrote:
> 
> HI All
> 
> I have 2 Maven subprojects. The first subporject's pom.xml has a
> dependency with scope set to provided. The second subporject's pom.xml has
> the same dependency with no scope set. What does Maven do in such a
> situtation.
> 
> Thank YOu
> 

-- 
View this message in context: http://old.nabble.com/Dependency-SCope-tp26697571p26697958.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