【问题标题】:CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependenciesCoreException:无法计算构建计划:插件 org.apache.maven.plugins:maven-compiler-plugin:2.5.1 或其依赖项之一
【发布时间】:2020-09-07 22:00:38
【问题描述】:

我在 Eclipse(Luna 服务版本 4.4.2)+ 安装的 TestNG(7.3.0)中创建了一个 Maven 项目,但不幸的是,尽管我已经更新了 TestNG 版本几次,但 TestNg 版本显示已安装 6.9.11使用其他成员在 Stack Overflow 上给出的建议。每当我尝试清理和构建 Maven 项目时。这是我看到的错误消息。有人可以帮我解决这个问题吗? 我看到有人建议运行一些 ```mvn -u clean install ``` 命令。由于我是 Maven 新手,有人可以向我解释在哪里运行这些命令吗?这是我的 POM.xml 文件供参考。

> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>com.appium.demo</groupId>
>   <artifactId>AppiumDemoProject</artifactId>
>   <version>0.0.1-SNAPSHOT</version>

<!-- https://mvnrepository.com/artifact/io.appium/java-client -->

<dependencies>
    <dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>7.3.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.141.59</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.testng/testng -->
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>7.3.0</version>
        <scope>test</scope>
    </dependency>



</dependencies>

【问题讨论】:

  • 你需要一个 标签来关闭项目。
  • 错过了项目标签,感谢您的投入。

标签: java maven testng maven-eclipse-plugin


【解决方案1】:

您应该在与 pom.xml 相同的目录中从命令行运行 mvn -U clean install。您还需要确保 maven 安装的 /bin 文件夹的目录在您的 PATH 上,以便您可以运行 mvn 命令。

【讨论】:

  • 一旦我安装了正确的 Maven 二进制 zip 文件,这对我很有帮助。谢谢你告诉我。
【解决方案2】:

已修复:安装正确的 Maven 二进制 zip 文件后。 [在此处输入图片说明][1]

[1]:https://i.stack.imgur.com/jruii.png。错误已修复。另外,我必须将标签从 Jar 更改为 Pom 文件。

【讨论】:

    猜你喜欢
    • 2014-03-21
    • 2012-09-14
    • 1970-01-01
    • 2017-09-28
    • 2013-04-26
    • 2015-02-15
    相关资源
    最近更新 更多