What is the output of:

mvn dependency:tree

-Chris




"David Weintraub" <[EMAIL PROTECTED]> 
11/04/2008 10:23
Please respond to
"Maven Users List" <users@maven.apache.org>


To
"Maven Users List" <users@maven.apache.org>
cc

Subject
Re: Dependency Relationships in EARs






Sure: Here's the POM for the Foundation:

<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.solbright</groupId>
    <artifactId>foundation</artifactId>
    <packaging>jar</packaging>
    <version>0.1</version>
    <name>foundation</name>
    <url>http://maven.apache.org</url>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jboss</groupId>
            <artifactId>jboss-j2ee</artifactId>
            <version>4.0.0</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.4</version>
        </dependency>
        <dependency>
            <groupId>jdom</groupId>
            <artifactId>jdom</artifactId>
            <version>b7</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>org.log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>0.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.enterprisedt</groupId>
            <artifactId>edtFTPj</artifactId>
            <version>1.5.3</version>
        </dependency>
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc14</artifactId>
            <version>10.2.0.2</version>
 </dependency>
        <dependency>
            <groupId>de.dankomannhaupt</groupId>
            <artifactId>jdbcappender</artifactId>
            <version>2.1.01</version>
        </dependency>
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>xsu</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>1.2.8</version>
        </dependency>
        <dependency>
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
            <version>1.3</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge</groupId>
            <artifactId>jox</artifactId>
            <version>1.17b3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.xmlgraphics</groupId>
            <artifactId>fop</artifactId>
            <version>0.20.4</version>
        </dependency>
        <dependency>
            <groupId>gnu-regexp</groupId>
            <artifactId>gnu-regexp</artifactId>
            <version>1.1.4</version>
        </dependency>
        <dependency>
            <groupId>com.oreilly</groupId>
            <artifactId>servlet-cos</artifactId>
            <version>20Nov2000</version>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <version>1.1</version>
        </dependency>
    </dependencies>
</project>

And here's the sample EAR:

<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.solbright</groupId>
  <artifactId>test-ear</artifactId>
  <packaging>ear</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>test-ear</name>
  <url>http://maven.apache.org</url>
  <dependencies>
      <dependency>
          <groupId>com.solbright</groupId>
          <artifactId>foundation</artifactId>
          <version>0.1</version>
      </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>


There's nothing in the EAR except for this dependency of
foundation.jar which is stored in our company's remote repository. I
saw that the pom.xml for Foundation is stored in the foundation.jar,
and I thought that's where it gets the dependency list from.

I'm thinking that the problem isn't in the POM as much as it is in the
repository setup.

On Thu, Apr 10, 2008 at 4:49 PM, Wayne Fay <[EMAIL PROTECTED]> wrote:
> The dependencies of your dependencies are called transitive 
dependencies.
>
>  Normally, Maven2 is able to figure out what you need and build/package
>  things properly. So, you must be doing something "wrong" to get these
>  results.
>
>  Can you send the 2 pom.xml files you created, 1 for foundation, and 1
>  for the EAR? I imagine you are doing something wrong with the scope.
>
>  Wayne
>
>
>
>  On 4/10/08, David Weintraub <[EMAIL PROTECTED]> wrote:
>  > I've just started using Maven, and I'm struggling with a few things.
>  >
>  > I took one our our components I build with Ant, and created a Maven
>  > build for it. This is a set of foundation classes that several of our
>  > projects use, so I called it "foundation.jar". So far, so good, I
>  > specified a set of JARS that this foundation.jar was dependent upon,
>  > and Maven downloaded the other 3rd party jars that were needed. This
>  > whole thing packaged itself all nice and neat.
>  >
>  > I downloaded this to our internal Maven Repository, and created a new
>  > EAR project. The project was an empty skeleton, but I specified it
>  > needed this foundation.jar. The ear packaged with the foundation.jar,
>  > but without any of the 3rd party JARS that foundation.jar needs in
>  > order to work. So, how do I get Maven to package all the needed 3rd
>  > party JARs that foundation.jar needs?
>  > --
>  > --
>  > David Weintraub
>  > [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]
>
>



-- 
--
David Weintraub
[EMAIL PROTECTED]

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


The following message has been automatically added by the Internet mail 
gateway to comply with the Group's Information Security requirements.

"This e-mail has arrived via the Internet, and therefore you should be 
cautious about its origin and content. Replies which contain sensitive 
information and / or legal/contractual obligations are particularly 
vulnerable.

In these cases you should not reply unless you are authorised to do so, 
and adequate encryption is employed."

If you have any questions, please contact the IS Service Desk.



**********************************************************************
CAUTION - This message is intended for the addressee named above. It may 
contain privileged or confidential information. 

If you are not the intended recipient of this message you must: 
- Not use, copy, distribute or disclose it to anyone other than the addressee;
- Notify the sender via return email; and
- Delete the message (and any related attachments) from your computer 
immediately.

Internet emails are not necessarily secure. Australian Associated Motors 
Insurers Limited ABN 92 004 791 744 (AAMI), and its related entities, do not 
accept responsibility for changes made to this message after it was sent.

Unless otherwise stated, views expressed within this email are the author's own 
and do not represent those of AAMI.
**********************************************************************

Reply via email to