Lachlan Deck wrote:
> 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?

You "inherit" version and scope. "scope" ensures that the artifact is used in 
the proper way and "version" will ensure that it is used everywhere in the 
right version.

- Jörg

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

Reply via email to