• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Transitive Dependency Problem

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am new to maven, I am using the m2Ecllipse plugin but when i try to run the build i am getting the transitive dependency problem;



Can you please suggest me how I can resolve this problem, Also how to update the sources in my local repository as it contains old versions of resources.
[ August 16, 2008: Message edited by: Kashif Mughal ]
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Can you post the dependencies you have mentioned in your maven POM?
 
Kashif Mughal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi these are the dependencies from my local repository, Can you suggest me the best way i could update them. I am try artifactory but no success;
Also suggest me if I can use maven2.0.9 and jdk 6, As i am creating a maven-archetype-webapp project but it uses jdk 1.4 by default. I need atleast jdk 5.0

Any suggestions; Thanks

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.0.3</version>
</dependency>

<dependency>
<groupId>springframework</groupId>
<artifactId>spring</artifactId>
<version>2.0-M4</version>
</dependency>

<dependency>
<groupId>springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>2.5.1</version>
</dependency>
<dependency>
<groupId>springframework</groupId>
<artifactId>spring-web</artifactId>
<version>1.2.6</version>
</dependency>
<dependency>
<groupId>springframework</groupId>
<artifactId>spring-full</artifactId>
<version>1.1-rc1</version>
</dependency>
<dependency>
<groupId>springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>1.2.6</version>
</dependency>
<dependency>
<groupId>jpox</groupId>
<artifactId>jpox-springframework</artifactId>
<version>1.2.0-beta-5</version>
</dependency>
<dependency>
<groupId>hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.1rc2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
 
Anadi Misra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

On your local machine i guess you do not necessarily need artifactory, archiva or Nexus or the like. You can choose to work offline once all the requiered artifacts have been downloaded.





If i understand correctly you are trying to create a webapp project. As far as I know you can very well create a webapp using maven - 2.0.9 and jdk 1.6 and it should not be a problem.





that is all you need; most probably you will be using an IDE so keep those matters to the IDE. yes for maven you can however ensure a sort of compiler level compliance to say jdk 5.0 by using the following



Not sure of why you are getting the 'Transitive Dependency' error here so you check whether you have deifned the repos other than maven's repo correctly in the repository/ repository proxy definitions of artifactory, or may be in your POM. Also ensure you are using compatible jar versions.

And yes please do not forget to use the code tags
 
Kashif Mughal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks alot,

Like you said i dont need any of the artifactory, Nexus or blah blah but my local repository is not updated. It has got springframework version 1.2.6 and hibernate version 3.1 and similarly for commons-logging and other resorces as well.
How could i update my local repository to take recent releases of these resources?
 
Anadi Misra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

artifacts mising errors are genrally due to either misconfiguration of the dependencies, or the fact that they are on repository which maven has to be explicitly informed of using the repositories tag.

How could i update my local repository to take recent releases of these resources?



the best way(after you have ensured all the repositories requiered have been configured)is to update the dependencies in the pom itself, maven will take of the rest.

Also cross-check with spring site or documentation but this might have to do with mismatched spring and hibernatem versions i dont think spring 1.2.X is compatible with hibernate 3.X, if you are using Spring Hibernate support ensure you are using spring 2, the latest is spring 2.0.8 and it has support for hibernate 2/3 or you may use spring 2.5.X

another thing i noticed from the dependenices you have mentioned



this should be changed to,



you have mentioned log4j twice too, remove the 1.1.3 one, also you can add repsoitories to your POM/settings.xml to point to repositories other than the standard maven repository. last but not the least, ensure to check the dependencies of an artifact before adding it to your pom to see if there are any specific requirements, if the project is mavenized it will have the information of dependencies by and large.

for further details I suggest you browse the maven docs, it will help a great deal in avoiding snags
 
Kashif Mughal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I appreciate the time you are giving, Infact i am using maven m2Eclipse plugin After adding all the dependencies, I did update dependencies But still the versions are same. I have added the www.planetmirror.com as a mirror.
Can you suggest me any good repository to look for updated versions as i have checked the http://repo1.maven.org/maven2/ but it does not contain updated stuff. May be i am doing something wrong. For help i send you my settings.xml please suggest what is the problem.


[ August 18, 2008: Message edited by: Kashif Mughal ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic