丢失了工件 org.seleniumhq.selenium:selenium-java:jar:3.14.59。

问题描述 投票:0回答:1

我的pom.xml文件

  <modelVersion>4.0.0</modelVersion>
  <groupId>zed.exiote</groupId>
  <artifactId>AMZNtoHH</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <dependencies>
  <!-- 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>
  </dependencies>
</project>

我一直试图在Eclipse中使用Maven下载硒,但这个错误一直在出现。

(缺少工件 org.seleniumhq.selenium:selenium-java:jar:3.14.59)

在这个错误解决之前,我无法构建或编译任何东西。

我是Eclipse Selenium和Maven的新手,所以我真的不知道是怎么回事。

java eclipse selenium maven
1个回答
0
投票

所以您应该尝试在 pom.xml 中进行检查。

  1. 检查pom.xml中是否指定了正确的仓库,而软件包正是从这里下载的。有可能是pom.xml中的url不正确,而你在.m2仓库中有所需的jar文件。
  2. 检查工件的版本,如果pom.xml中指定的版本在仓库中存在,就应该从那里下载。
  3. 检查jar是否丢失。如果是,请手动将其放置在.m2仓库中。有时pom.xml中提到的jar没有被下载,会出现错误。
  4. 你也可以尝试删除整个.m2仓库文件夹,然后运行maven构建。这些jar会被从头下载。这或许也能解决这个问题。
© www.soinside.com 2019 - 2024. All rights reserved.