John Dennis Casey e687cfed61 o Added dependencyDefaults section to POM.
The nested <dependencyDefault> element closely mirrors the <dependency> element specification.
  It provides the ability to set url, artifact, properties, version for a dependency that matches on
  {groupId, artifactId, type}. Url, artifact, and version will only override the dependency's values if
  the dependency doesn't provide the value, and (in the case of url and artifact) the dependency
  doesn't provide a version (url and artifact are assumed to be version-specific).

  Properties will only be overwritten, and only in the case where the dependency
  doesn't specify them.

  Dependencies are validated after merging with defaults, since version is not required
  on either <dependency> or <dependencyDefault> but is required between the two.

o Added component interface/default impl for injecting project defaults.
o Added unit and integration tests.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163323 13f79535-47bb-0310-9956-ffa450edef68
2005-02-01 22:43:03 +00:00

31 lines
784 B
XML

<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven</groupId>
<artifactId>maven-core-it0011</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven</groupId>
<artifactId>maven-plugin</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
<dependencyDefaults>
<dependencyDefault>
<groupId>maven</groupId>
<artifactId>maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
</dependencyDefault>
<dependencyDefault>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependencyDefault>
</dependencyDefaults>
</project>