【问题标题】:How to fix maven plugin errors on jenkins?如何修复jenkins上的maven插件错误?
【发布时间】:2019-08-02 19:52:45
【问题描述】:

我在 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]

我尝试通过添加关于的依赖项来更新 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>

我还在插件上附加了 java JDK 版本:

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

我能得到调试它的任何提示吗?

【问题讨论】:

    标签: maven plugins jenkins-plugins


    【解决方案1】:

    这不是 Maven 问题。请删除您添加的不必要的依赖项。

    相反,无法删除该文件。它可能被另一个仍在运行的程序使用,或者 Jenkins 中的用户可能无权执行此操作。

    【讨论】:

      猜你喜欢
      • 2018-05-01
      • 1970-01-01
      • 2021-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多