You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jeroen Verhagen <je...@gmail.com> on 2005/09/18 16:44:56 UTC

newbie problem downloading depenencies

Hi all,

I'm trying to use Maven on a project using the Spring framework so I
added this dependency to my project.xml:


    <dependency>
      <groupId>springframework</groupId>
      <artifactId>spring</artifactId>
      <version>1.2.4</version>
    </dependency>

However when I run the program I get the following error:

    [java] Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/logging/LogFactory

Why is the commons-jar on which Spring is dependent not downloaded
automatically?

I noticed that the maven repository does not contain a pom for version
1.2.4 only for 1.1.2. Are the poms not necessary for downloading the
other jars on which a jar is dependent? (I tried moving to Spring
version 1.1.2 but that didn't solve the problem)

Thanks and regards,

Jeroen

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


Re: newbie problem downloading depenencies

Posted by Andy Glick <an...@acm.org>.
At 12:21 PM 9/18/2005, Jeroen Verhage wrote:
> > Transitive dependencies aren't supported in maven 1.
>
>I remember, some time ago, Maven downloading jars that I did not
>declare as a dependency so I expected transitive dependency to be
>supported by the version of Maven I'm using.

Maven 1 would have downloaded any jars which 1) were dependencies of any 
plugins that were invoked implicitly or explicitly and 2) had not yet been 
downloaded

That is most likely why you saw jars being downloaded that were not 
declared as dependents of your project 


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


Re: newbie problem downloading depenencies

Posted by Jeroen Verhagen <je...@gmail.com>.
On 9/18/05, Arnaud HERITIER <ah...@gmail.com> wrote:
> Do you use maven 1 or 2 ?

I probably should haven mentioned that, I use maven 1.0.2

> Transitive dependencies aren't supported in maven 1.

I remember, some time ago, Maven downloading jars that I did not
declare as a dependency so I expected transitive dependency to be
supported by the version of Maven I'm using.

Thanks and regards,

Jeroen

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


RE: newbie problem downloading depenencies

Posted by Arnaud HERITIER <ah...@gmail.com>.
Do you use maven 1 or 2 ?

Transitive dependencies aren't supported in maven 1.
Thus if you have a project A which uses an artifact B and if this artifact B needs an artifact C, you should declare the dependency
for C in the project A.


Arnaud

> -----Message d'origine-----
> De : Jeroen Verhagen [mailto:jeroenverhagen@gmail.com] 
> Envoyé : dimanche 18 septembre 2005 16:45
> À : users@maven.apache.org
> Objet : newbie problem downloading depenencies
> 
> Hi all,
> 
> I'm trying to use Maven on a project using the Spring 
> framework so I added this dependency to my project.xml:
> 
> 
>     <dependency>
>       <groupId>springframework</groupId>
>       <artifactId>spring</artifactId>
>       <version>1.2.4</version>
>     </dependency>
> 
> However when I run the program I get the following error:
> 
>     [java] Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/commons/logging/LogFactory
> 
> Why is the commons-jar on which Spring is dependent not 
> downloaded automatically?
> 
> I noticed that the maven repository does not contain a pom for version
> 1.2.4 only for 1.1.2. Are the poms not necessary for 
> downloading the other jars on which a jar is dependent? (I 
> tried moving to Spring version 1.1.2 but that didn't solve 
> the problem)
> 
> Thanks and regards,
> 
> Jeroen
> 
> ---------------------------------------------------------------------
> 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