在打包之前,我使用maven-dependecy-plugins复制目标将资源复制到另一个文件夹中。
<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,但它没有任何效果。有没有办法做到这一点?
发布于 2012-02-06 01:06:58
我现在使用jenkins的复制工件插件解决了我的问题。
发布于 2012-02-03 02:31:20
我猜你会得到一个已解决的问题,那就是工件不存在或在任何存储库中都找不到。这就是maven的工作方式,如果你指定了一个依赖项,你需要能够检索它。
https://stackoverflow.com/questions/9117627
复制相似问题