What type of projects are A and B? Jars? War and jar? Jar is not meant
to be deployed, so it doesn't "grab" it dependent projects, it just
references them for compiling (or testing). A war is meant to be
deployed on its own, so its dependencies are pulled into it's
WEB-INF/lib directory along with it when it's packaged up into a .war
file artifact.

If you specify all your dependencies with scope of "compile", then they
will all be pulled into the eventual war file, or other deployable
artifact.

Does that help explain things?

-----Original Message-----
From: Brad O'Hearne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 31, 2006 5:49 PM
To: Maven Users List
Subject: Re: Need help setting up a transitive dependency

Dov,

Thanks for the reply. Ok, so this isn't going to trigger a build of
project A, its just going to pull project A from the repository as it
would any other dependency. Is this correct, or am I still missing
something? How do I get project B to automatically pull all of project
A's dependencies along with project A? Will this happen automatically?

Brad

Dov Wasserman wrote:

>Add a section in project B's pom.xml:
>
>    <dependencies>
>        <dependency>
>            <groupId>my-group</groupId>
>            <artifactId>project-A</artifactId>
>            <version>1.0-SNAPSHOT</version>
>            <scope>compile</scope>
>        </dependency>
>         ...
>    </dependencies>
>
>You might need to configure the scope property to something other than 
>compile if you don't want A's jar file to be included with B's 
>artifacts. Generally, you can leave it as compile.
>
>Hope this helps,
>
>-Dov
> 
>
>-----Original Message-----
>From: Brad O'Hearne [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, January 31, 2006 5:39 PM
>To: users@maven.apache.org
>Subject: Need help setting up a transitive dependency
>
>Here's a maven 101 question:
>
>I need help setting up a transitive dependency. I have project A, which

>is properly set up and building using maven. Now I need to configure 
>project B to depend on project A. How do I configure this in my pom.xml

>to refer to another project?
>
>Thanks for your help....
>
>Brad
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to