简体   繁体   English

如何修复Jenkins上的Maven插件错误?

[英]How to fix maven plugin errors on jenkins?

I'm setting up a maven project on Jenkins, and I tried to build it, but I got errors on 我在詹金斯(Jenkins)上建立了一个Maven项目,我尝试构建它,但是在

Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean (default-clean) on project BankSystem: Failed to clean project: Failed to delete /Users/lilyli/Documents/IntelliJ-wrokspace/BankSystem/target/surefire-reports/TEST-com.lily.project.AppTest.xml -> [Help 1]

I tried to update the pom.xml file by adding dependencies about 我尝试通过添加有关以下内容的依赖项来更新pom.xml文件

    <dependency>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-clean-plugin</artifactId>
      <version>3.1.0</version>
    </dependency>


    <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
    <dependency>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.6.0</version>
    </dependency>

and I also attached java JDK version on the plugin: 并且我还在插件上附加了Java JDK版本:

<plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.6.0</version>
            <configuration>
              <source>1.8</source>
              <target>1.8</target>
            </configuration>
</plugin>

Can I get any hints to debug it? 我可以得到任何调试提示吗?

This is not a Maven problem. 这不是Maven问题。 Please remove the unnecessary dependencies you added. 请删除您添加的不必要的依赖项。

Instead, the file cannot be deleted. 而是,该文件无法删除。 It might be used by another program that is still running or the user in Jenkins might not have the rights to do it. 它可能会被仍在运行的另一个程序使用,或者Jenkins中的用户可能无权执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM