If I read you right, then I have to treat Maven 2 as if it is Maven 1 and self-discover what all my project's runtime dependencies are going to be? Our configuration management dept requires that all our projects use the same versions of xerces, xalan, etc. This is controlled via the build.properties file. Putting it in each project's POM still leads to the possibility that other projects will use different versions.

So it sounds like I have to have a dependencyManagement section in a master pom and then each project has to specify all its dependencies and this will then cause the versions specified in transitive dependencies not to be used?
Ralph



Brett Porter wrote:
Just put the dependency in your own POM when you need to force that
version, and the dependency management will be applied.

The dependency management is not applied to transitive dependencies, but
removing the version in the repository won't change that (they'd just
fail instead).

- Brett

Ralph Goers wrote:
We have been using Maven 1 for all our projects.  We have a master
build.properties file that contains the version of every dependency we
use throughout all of our projects.
I am now attempting to build a project using maven 2 and was having some
success. I then came across
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html.
This looked great until I happened upon
http://marc.theaimsgroup.com/?l=turbine-maven-user&m=113656701325017&w=2
<http://marc.theaimsgroup.com/?l=turbine-maven-user&m=113656701325017&w=2>.
Unfortunately, this is exactly the wrong behavior for anyone moving from
version 1 to version 2.  Furthermore, unless the repository at ibiblio
is going to be modified to remove the versions from the dependencies
there then this is also the incorrect default behavior for anyone -
unless everyone is forced to disable transitive dependencies.

Without this control projects will very quickly have multiple versions
of jars.

So am I missing something?  Is there another configuration item that can
be specified on a dependency in the dependencyManagement section to
cause it to override child poms?

Unfortunately, unless this is remedied we will be forced to stick with
Maven 1 as the only alternative I can think of is to have our
configuration management folks modify every pom in our local repository
(our copy of ibiblio) to remove all the dependency versions.

Ralph

---------------------------------------------------------------------
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]


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

Reply via email to