gpt4 book ai didi

java - 在 Azure DevOps 管道构建中出现此错误 "Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile"

转载 作者:行者123 更新时间:2023-12-02 00:34:47 25 4
gpt4 key购买 nike

我有一个 Maven 项目,它在我的本地机器 Eclipse 上成功运行。但是当我在 Azure DevOps 管道上运行相同的内容时,它显示“无法执行目标 org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile”

我已经在我的 pom.xml 中尝试了所有可能的配置。我几乎要放弃这个了。

UTF-8

    <maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<java.version>1.8</java.version>

</properties>

<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14.1</version>
<configuration>
<!-- Suite testng xml file to consider for test execution -->
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
<forkMode>never</forkMode>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<executable>C:\Program Files\Java\jdk1.8.0_181\bin\javac.exe</executable>

</configuration>
</plugin>
</plugins>

最佳答案

我刚刚将代理从 ubuntu 更改为 Windows。它解决了。

关于java - 在 Azure DevOps 管道构建中出现此错误 "Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57989003/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com