Maven依赖插件复制目标应忽略ArtifactItem缺少的依赖项

时间:2018-08-16 10:45:55

标签: maven maven-3 maven-dependency-plugin

我有以下POM片段:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.0.2</version>
        <executions>
            <execution>
                <id>copy</id>
                <phase>package</phase>
                <goals>
                    <goal>copy</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <artifactItems>
                <artifactItem>
                    <groupId>${g}</groupId>
                    <artifactId>${a}</artifactId>
                    <version>${v}</version>
                    <type>war</type>
                    <destFileName>webapplication.war</destFileName>
                    <overWrite>true</overWrite>
                </artifactItem>
            </artifactItems>
        </configuration>
    </plugin>

如果给定的工件在存储库中没有其父代及其依赖项,则此操作失败。我可以以某种方式指示Maven忽略缺少的依赖项吗?无论如何,我只想复制这一个工件。

0 个答案:

没有答案