You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Carlos Sanchez <ma...@carlos.cousas.net> on 2004/02/06 22:25:29 UTC

Recursive dependencies

Hi!

I'd like to know if there is any elegant way to avoid defining the
dependencies of the dependencies.

E.g. My project depends on xdoclet but xdoclet depends on commons-logging
and commons-collections, so I must include dependencies to every xdoclet jar
and both commons jars

      <!-- XDoclet dependencies -->
      <dependency>
         <groupId>xdoclet</groupId>
         <artifactId>xjavadoc</artifactId>
         <version>1.0.2</version>
         <url>http://xdoclet.sourceforge.net</url>
      </dependency>

      <dependency>
         <groupId>xdoclet</groupId>
         <artifactId>xdoclet</artifactId>
         <version>1.2</version>
         <url>http://xdoclet.sourceforge.net</url>
      </dependency>

      <dependency>
         <groupId>xdoclet</groupId>
         <artifactId>xdoclet-xdoclet-module</artifactId>
         <version>1.2</version>
         <url>http://xdoclet.sourceforge.net</url>
      </dependency>

      <dependency>
         <groupId>xdoclet</groupId>
         <artifactId>xdoclet-ejb-module</artifactId>
         <version>1.2</version>
         <url>http://xdoclet.sourceforge.net</url>
      </dependency>

      <dependency>
         <groupId>xdoclet</groupId>
         <artifactId>xdoclet-web-module</artifactId>
         <version>1.2</version>
         <url>http://xdoclet.sourceforge.net</url>
      </dependency>

      <dependency>
         <groupId>xdoclet</groupId>
         <artifactId>xdoclet-jmx-module</artifactId>
         <version>1.2</version>
         <url>http://xdoclet.sourceforge.net</url>
      </dependency>

      <dependency>
         <groupId>xdoclet</groupId>
         <artifactId>xdoclet-jboss-module</artifactId>
         <version>1.2b4</version>
         <url>http://xdoclet.sourceforge.net</url>
      </dependency>

      <!-- Jakarta Commons Dependencies -->
      <dependency>
         <groupId>commons-collections</groupId>
         <artifactId>commons-collections</artifactId>
         <version>2.1</version>
         <url>http://jakarta.apache.org/commons</url>
      </dependency>

      <dependency>
         <groupId>commons-logging</groupId>
         <artifactId>commons-logging</artifactId>
         <version>1.0.3</version>
         <url>http://jakarta.apache.org/commons</url>
      </dependency>


What I have done is save this in a separate xml file and include it in
project.xml with a standard xml include. That cleans the code a bit.

It would be easier if every jar had some kind of metadata to define
dependencies (maybe its maven project file?) ;)

Thanks in advance



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


RE: Recursive dependencies

Posted by Carlos Sánchez <ma...@carlos.cousas.net>.
I'm sorry but what I've found were recomendations to explicitly set every
dependence. I'll suppose that it's the last word.

> -----Mensaje original-----
> De: Jason van Zyl [mailto:jvanzyl@maven.org] 
> Enviado el: sábado, 07 de febrero de 2004 0:00
> Para: Maven Users List
> Asunto: Re: Recursive dependencies
> 
> On Fri, 2004-02-06 at 16:25, Carlos Sanchez wrote:
> > Hi!
> > 
> > I'd like to know if there is any elegant way to avoid defining the 
> > dependencies of the dependencies.
> 
> It is always helpful to take a quick look at the mail archive 
> before asking questions.
> 
> http://nagoya.apache.org/eyebrowse/SummarizeList?listName=user
s@maven.apache.org
> 
> You'll see that we've answered this question about 50 times now.
> 
> > E.g. My project depends on xdoclet but xdoclet depends on 
> > commons-logging and commons-collections, so I must include 
> > dependencies to every xdoclet jar and both commons jars
> > 
> >       <!-- XDoclet dependencies -->
> >       <dependency>
> >          <groupId>xdoclet</groupId>
> >          <artifactId>xjavadoc</artifactId>
> >          <version>1.0.2</version>
> >          <url>http://xdoclet.sourceforge.net</url>
> >       </dependency>
> > 
> >       <dependency>
> >          <groupId>xdoclet</groupId>
> >          <artifactId>xdoclet</artifactId>
> >          <version>1.2</version>
> >          <url>http://xdoclet.sourceforge.net</url>
> >       </dependency>
> > 
> >       <dependency>
> >          <groupId>xdoclet</groupId>
> >          <artifactId>xdoclet-xdoclet-module</artifactId>
> >          <version>1.2</version>
> >          <url>http://xdoclet.sourceforge.net</url>
> >       </dependency>
> > 
> >       <dependency>
> >          <groupId>xdoclet</groupId>
> >          <artifactId>xdoclet-ejb-module</artifactId>
> >          <version>1.2</version>
> >          <url>http://xdoclet.sourceforge.net</url>
> >       </dependency>
> > 
> >       <dependency>
> >          <groupId>xdoclet</groupId>
> >          <artifactId>xdoclet-web-module</artifactId>
> >          <version>1.2</version>
> >          <url>http://xdoclet.sourceforge.net</url>
> >       </dependency>
> > 
> >       <dependency>
> >          <groupId>xdoclet</groupId>
> >          <artifactId>xdoclet-jmx-module</artifactId>
> >          <version>1.2</version>
> >          <url>http://xdoclet.sourceforge.net</url>
> >       </dependency>
> > 
> >       <dependency>
> >          <groupId>xdoclet</groupId>
> >          <artifactId>xdoclet-jboss-module</artifactId>
> >          <version>1.2b4</version>
> >          <url>http://xdoclet.sourceforge.net</url>
> >       </dependency>
> > 
> >       <!-- Jakarta Commons Dependencies -->
> >       <dependency>
> >          <groupId>commons-collections</groupId>
> >          <artifactId>commons-collections</artifactId>
> >          <version>2.1</version>
> >          <url>http://jakarta.apache.org/commons</url>
> >       </dependency>
> > 
> >       <dependency>
> >          <groupId>commons-logging</groupId>
> >          <artifactId>commons-logging</artifactId>
> >          <version>1.0.3</version>
> >          <url>http://jakarta.apache.org/commons</url>
> >       </dependency>
> > 
> > 
> > What I have done is save this in a separate xml file and 
> include it in 
> > project.xml with a standard xml include. That cleans the code a bit.
> > 
> > It would be easier if every jar had some kind of metadata to define 
> > dependencies (maybe its maven project file?) ;)
> > 
> > Thanks in advance
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> 
> --
> jvz.
> 
> Jason van Zyl
> jason@maven.org
> http://maven.apache.org
> 
> happiness is like a butterfly: the more you chase it, the 
> more it will elude you, but if you turn your attention to 
> other things, it will come and sit softly on your shoulder ...
> 
>  -- Thoreau 
> 
> 
> ---------------------------------------------------------------------
> 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: Recursive dependencies

Posted by Jason van Zyl <jv...@maven.org>.
On Fri, 2004-02-06 at 16:25, Carlos Sanchez wrote:
> Hi!
> 
> I'd like to know if there is any elegant way to avoid defining the
> dependencies of the dependencies.

It is always helpful to take a quick look at the mail archive before
asking questions.

http://nagoya.apache.org/eyebrowse/SummarizeList?listName=users@maven.apache.org

You'll see that we've answered this question about 50 times now.

> E.g. My project depends on xdoclet but xdoclet depends on commons-logging
> and commons-collections, so I must include dependencies to every xdoclet jar
> and both commons jars
> 
>       <!-- XDoclet dependencies -->
>       <dependency>
>          <groupId>xdoclet</groupId>
>          <artifactId>xjavadoc</artifactId>
>          <version>1.0.2</version>
>          <url>http://xdoclet.sourceforge.net</url>
>       </dependency>
> 
>       <dependency>
>          <groupId>xdoclet</groupId>
>          <artifactId>xdoclet</artifactId>
>          <version>1.2</version>
>          <url>http://xdoclet.sourceforge.net</url>
>       </dependency>
> 
>       <dependency>
>          <groupId>xdoclet</groupId>
>          <artifactId>xdoclet-xdoclet-module</artifactId>
>          <version>1.2</version>
>          <url>http://xdoclet.sourceforge.net</url>
>       </dependency>
> 
>       <dependency>
>          <groupId>xdoclet</groupId>
>          <artifactId>xdoclet-ejb-module</artifactId>
>          <version>1.2</version>
>          <url>http://xdoclet.sourceforge.net</url>
>       </dependency>
> 
>       <dependency>
>          <groupId>xdoclet</groupId>
>          <artifactId>xdoclet-web-module</artifactId>
>          <version>1.2</version>
>          <url>http://xdoclet.sourceforge.net</url>
>       </dependency>
> 
>       <dependency>
>          <groupId>xdoclet</groupId>
>          <artifactId>xdoclet-jmx-module</artifactId>
>          <version>1.2</version>
>          <url>http://xdoclet.sourceforge.net</url>
>       </dependency>
> 
>       <dependency>
>          <groupId>xdoclet</groupId>
>          <artifactId>xdoclet-jboss-module</artifactId>
>          <version>1.2b4</version>
>          <url>http://xdoclet.sourceforge.net</url>
>       </dependency>
> 
>       <!-- Jakarta Commons Dependencies -->
>       <dependency>
>          <groupId>commons-collections</groupId>
>          <artifactId>commons-collections</artifactId>
>          <version>2.1</version>
>          <url>http://jakarta.apache.org/commons</url>
>       </dependency>
> 
>       <dependency>
>          <groupId>commons-logging</groupId>
>          <artifactId>commons-logging</artifactId>
>          <version>1.0.3</version>
>          <url>http://jakarta.apache.org/commons</url>
>       </dependency>
> 
> 
> What I have done is save this in a separate xml file and include it in
> project.xml with a standard xml include. That cleans the code a bit.
> 
> It would be easier if every jar had some kind of metadata to define
> dependencies (maybe its maven project file?) ;)
> 
> Thanks in advance
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 
jvz.

Jason van Zyl
jason@maven.org
http://maven.apache.org

happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...

 -- Thoreau 


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