You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by je...@accenture.com on 2007/01/31 12:22:41 UTC

dependency classpath order

Hi,

 

My project depends on a lot of dependencies that can be found in the
online Maven repo, 

but also on a lot of own jars that were made to connect to web services
etc.

I installed them manually in the repo with mvn install:install-file.

 

Now I'm having this problem, when my classpath entries aren't in a
certain order, I can't run my project.

I always have to put them in the right order before packaging my
project.

So is there a way to define in which order the classpath entries have to
be?

 

I searched in the mailing list history, and I found a same issue with
Maven 1.1.

Jason Van Zyl, a member of the Mergere team, said back then, that the
order in the classpath corresponds to the order of the dependencies in
the pom.xml files.

 

It looks like this isn't exactly correct.

And what if I'm using modules in my project?

 

For example, in my top parent pom.xml, I declared the dependency log4j.

Every module uses log4j, so that's why I put that dependency in my
parent pom.

But after the build of my whole project, log4j is situated in the middle
of the classpath.

For so far Jason's explanation ...

 

Anybody an idea ?

 

Kind regards

 

Jelle



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

RE: dependency classpath order

Posted by Greg Jones <gr...@gkj.com.au>.
Hi Jelle,

You may need to update to the 2.0.5 build to get dependencies in the correct
order. This was the case with plugins and it may be that they fixed this
problem at the same time.

Cheers,

Greg J. 

-----Original Message-----
From: jelle.volckaert@accenture.com [mailto:jelle.volckaert@accenture.com] 
Sent: Wednesday, 31 January 2007 10:23 PM
To: users@maven.apache.org
Subject: dependency classpath order

Hi,

 

My project depends on a lot of dependencies that can be found in the online
Maven repo, 

but also on a lot of own jars that were made to connect to web services etc.

I installed them manually in the repo with mvn install:install-file.

 

Now I'm having this problem, when my classpath entries aren't in a certain
order, I can't run my project.

I always have to put them in the right order before packaging my project.

So is there a way to define in which order the classpath entries have to be?

 

I searched in the mailing list history, and I found a same issue with Maven
1.1.

Jason Van Zyl, a member of the Mergere team, said back then, that the order
in the classpath corresponds to the order of the dependencies in the pom.xml
files.

 

It looks like this isn't exactly correct.

And what if I'm using modules in my project?

 

For example, in my top parent pom.xml, I declared the dependency log4j.

Every module uses log4j, so that's why I put that dependency in my parent
pom.

But after the build of my whole project, log4j is situated in the middle of
the classpath.

For so far Jason's explanation ...

 

Anybody an idea ?

 

Kind regards

 

Jelle



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete the
original.  Any other use of the email by you is prohibited.

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