5

There are several questions about maven and transitive dependency exclusion. However, I don't get it working. I have some dependencies in my pom, that repackaged some libraries, in order to reduce the size of the pom. So far this is successful. But when I'm running mvn eclipse:eclipse these transitive dependencies get written into the .classpath file. Even though they are excluded like in the following excerpt.

    <dependency>
        <groupId>foo.bar</groupId>
        <artifactId>foobar</artifactId>
        <version>1.2.4</version>
        <exclusions>
            <exclusion>
                <groupId>*</groupId>
                <artifactId>*</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T13:57:37+02:00)

Java version: 1.7.0_45, vendor: Oracle Corporation

Angelo.Hannes
  • 1,729
  • 1
  • 18
  • 46

1 Answers1

0

I have found that the m2eclipse plugin for Eclipse provides better integration than maven-eclipse-plugin does. Apache itself has stopped maintaining it and advises going for m2eclipse instead.

Try in Eclipse to "import as Maven Project".