Project build error: Non-resolvable parent POM for com.smartbear.soapui:soapui:[unknown-version]

Project build error: Non-resolvable parent POM for com.smartbear.soapui:soapui:[unknown-version]

我正在尝试创建可以执行 SOAPUI 测试用例的简单 MAVEN 项目。

我正在尝试使用 SOAPUI 网站中提到的 pom.xml。下面是 link:

http://smartbearsoftware.com/repository/maven2/com/smartbear/soapui/soapui/5.2.1/

在 POM.xml 我收到以下异常:

Project build error: Non-resolvable parent POM for com.smartbear.soapui:soapui:[unknown-version]: Failure to find com.smartbear.soapui:soapui-project:pom:
 5.2.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has 
 elapsed or updates are forced and 'parent.relativePath' points at wrong local POM

正如错误消息所说,我认为它找不到父存储库。

您要查找的依赖项在 http://smartbearsoftware.com/repository/maven2/ maven repository, but is not in https://repo.maven.apache.org/maven2/ 中(至少现在是这样,也许将来会添加到其他存储库中)。

从这个意义上说,您显示的错误非常清楚:

... Failure to find com.smartbear.soapui:soapui-project:pom:5.2.1 in https://repo.maven.apache.org/maven2 ...

要解决您的问题,您必须在 POM.xml 或 Maven 设置中添加 smartbear 存储库,以解决所需的依赖关系。例如,要添加 POM.xml 只需使用 <repositories> 节点,如下所示:

<project>
...
  <repositories>
    <repository>
      <id>smartbear</id>
      <name>smartbear repository</name>
      <url>http://smartbearsoftware.com/repository/maven2</url>
    </repository>
  </repositories>
...

您可以查看有关配置额外 Maven 存储库的更多信息here