On 11/3/06, jp4 <[EMAIL PROTECTED]> wrote:

I have a client with many different maven projects.  I am trying to figure
out a way to manage the versions of common libraries across these projects
without duplicating the version number in each project.

This is typically done with <dependencyManagement>.  You specify
version numbers there, then just declare the groupId and artifactId in
the module that needs it.  (There have been some issues with
dependency management and transitive dependencies, so check JIRA or
the list archives if it doesn't seem to be working right.)

For example,
commons-lang-1.1.jar is used in 50 projects.  I know that I can use a parent
pom file to do this, but I don't want all of my projects to include
everything in the parent pom.  Is there a way to import or include a
dependency in your pom... So for example, define a file with common-lang
dependency and include that in all pom files that need to reference it?

To inherit it without ever declaring it again, just put it in
<dependencies> in a top-level pom.

Many organizations have a 'master pom' (with no <modules>) that the
various [project]-parent poms inherit from.

If you do this, be sure the dependencies are *really* common to all projects.

--
Wendy

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

Reply via email to