Hello, I think dep.mgmt. is meant to declare "if an artifact with this groupId/artifactId appears somewhere in the dependency tree, include the version stated here; but don't include it by default".
For instance, if your module A depends on module B which in turn depends on module C 1.0 but you'd like to use C 2.0, you can put it in A's dependencyManagement. This is probably good practice as C is not a direct dependency of A. (In particular, if a new version of B comes out that no longer requires C, C will be dropped altogether and not included from A). Greetings, David > -----Original Message----- > From: Lachlan Deck [mailto:[EMAIL PROTECTED] > Sent: 24 April 2008 08:55 > To: Maven Users List > Subject: Re: dependencyManagement help > > Hi there, > > On 24/04/2008, at 4:37 PM, Jörg Schaible wrote: > > >> -- root parent pom -- > >> <dependencyManagement> > >> <dependencies> > >> <dependency> > >> <groupId>...</groupId> > >> <artifactId>...</artifactId> > >> <type>...</type> > >> <version>...</version> > >> </dependency> > >> </dependencies> > >> </dependencyManagement> > >> > >> -- /frameworks/pom.xml -- > >> <dependencies> > >> <dependency> > >> <groupId>...</groupId> > >> <artifactId>...</artifactId> > >> <scope>provided</scope> > >> </dependency> > >> </dependencies> > >> > >> And so forth. Previously I had no dependencyManagement at > >> all. So the > >> only mention of the version of a dependency is in the management > >> section. However, now when I do a 'mvn clean' I get the following. > > > > The two artifacts to not match. An artifact is defined by groupId, > > artifactId, type and optional classifier. The type defaults to > > "jar". This might give you an idea ;-) > > Then I'm not seeing what purpose the dependencyManagement section > serves if I've still gotta declare pretty much everything apart from > 'version' in other dependency declarations? > > with regards, > -- > > Lachlan Deck > > > > > --------------------------------------------------------------------- > 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]
