我在詹金斯建立了一个maven项目。
我收到以下错误
Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.2:clean
(default-clean) on project informiam-platform: Failed to delete directory:
/jenkins/.jenkins/workspace/project/target. Reason:
Unable to delete directory
/jenkins/.jenkins/workspace/project/target/checkout/pathTo/
target-grunt/node_modules/grunt-contrib-uglify/node_modules/.bin -> [Help 1]
当我以相同的用户jenkin运行登录机器时,我能够手动删除文件夹而没有任何问题。
任何帮助都会受到赞赏,即使你有一个方法可以输出它为什么无法删除.bin文件夹?
答案 0 :(得分:0)
最有可能的.bin文件没有暴露给maven。您可能还需要配置maven-clean-plugin来删除.bin文件。以下是配置的摘录:
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.2</version>
<configuration>
<filesets>
<fileset>
<directory>${basedir}\target</directory>
<includes>
<include>**/*.bin</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>