Maven 2.x Eclipse Plugin

Maven Eclipse Plugin does not take dependencyManagement excludes into account when building eclipse CP configuration.

Details

  • Number of attachments :
    0

Description

I have a parent pom that excludes xml-apis:xml-apis from dom4j:dom4j in the dependencyManagement section. To make certain that as the project development progresses no artifacts depend on xml-apis:xml-apis (it is superseded by org.apache.xerces:xml-apis) I've forced the version of xml-apis:xml-apis in the same dependencyManagement section to be -1. No artifact should depend on it since I'm excluding all dependencies on it manually and adding org.apache.xerces:xml-apis as a manual dependency. In Maven this works fine. When I run maven-eclipse-plugin in a child module of this pom artifact which depends on dom4j:dom4j however, it tries to download xml-apis:xml-apis:jar:-1 and after failing it adds it to the project's classpath configuration (which obviously causes eclipse to throw errors not being able to find xml-apis:xml-apis:jar:-1 in my local repository.

<dependencyManagement>
<dependencies>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>${dom4j.version}</version>

<excludes>
<exclude>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclude>
</excludes>
</dependency>

<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>-1</version>
</dependency>
</dependencies>
</dependencyManagement>

Issue Links

Activity

Hide
Arnaud Heritier added a comment -

probably related ....

Show
Arnaud Heritier added a comment - probably related ....
Hide
Auke van Leeuwen added a comment -

Sounds like a duplicate of MECLIPSE-368.

Show
Auke van Leeuwen added a comment - Sounds like a duplicate of MECLIPSE-368.
Hide
Stephane Landelle added a comment -

Duplicate of MECLIPSE-603. Can be closed.

Show
Stephane Landelle added a comment - Duplicate of MECLIPSE-603. Can be closed.
Hide
Arnaud Heritier added a comment -

FYI exclusions tags are <exclusions><exclusion>...</exclusion></exclusions> and not <excludes><exclude>...</exclude></excludes>

Show
Arnaud Heritier added a comment - FYI exclusions tags are <exclusions><exclusion>...</exclusion></exclusions> and not <excludes><exclude>...</exclude></excludes>

People

Vote (4)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: