Maven 3.3.9不包含传递依赖

时间:2016-04-08 00:20:10

标签: dependencies maven-3

我正在尝试排除下面pom的所有传递依赖项:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.test</groupId>
    <artifactId>test</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>

    <dependencies>
        <dependency>
            <groupId>org.apache.solr</groupId>
            <artifactId>solr-core</artifactId>
            <version>5.4.1</version>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</project>

我跑:

/usr/local/apps/apache-maven-3.3.9/bin/mvn eclipse:eclipse -U

然而它失败了:

Failed to retrieve org.restlet.jee:org.restlet-2.3.0
Path to dependency: 
  1) com.test:test:jar:1.0-SNAPSHOT
  2) org.apache.solr:solr-core:jar:5.4.1
  3) org.restlet.jee:org.restlet.ext.servlet:jar:2.3.0

我认为maven 3.3.9在依赖项的排除中支持通配符?

0 个答案:

没有答案