我打包前使用maven-dependecy-plugins複製目標將資源複製到另一個文件夾中。如何忽略maven-dependency-plugin的複製目標錯誤?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>copy</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<failBuild>false</failBuild>
<artifactItems>
<artifactItem>
<groupId>my.groupID</groupId>
<artifactId>myArtifact</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>my/custom/path</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
該資源不重要,很可能無法訪問。這就是爲什麼我希望構建不會失敗,如果它不可訪問。我已經將failBuild屬性設置爲false,但它沒有效果。有沒有辦法做到這一點?
你可以提供一些關於此解決方案的更多信息嗎? – 2017-06-01 09:04:51
@gundev恐怕我不記得了。我爲這種太短的答案道歉。我不知道我在想什麼。 – 2017-06-01 09:07:55