gpt4 book ai didi

java - 导入时打开项目时出错(maven dep

转载 作者:行者123 更新时间:2023-12-02 09:54:54 27 4
gpt4 key购买 nike

我刚刚开始使用 cloudstack,想要让开发环境运行起来。我安装了 Maven,并使用 Eclipse。我一直在关注this指南,这似乎有点过时,但我一直无法找到有关在 Eclipse 中实现此操作的最新信息。

我正在运行的版本:

--Eclipse 4.1
--Maven 3.6.1
--Java 1.8.0_211
--Cloudstack 4.9

导入后我收到 152 个错误(所有错误似乎都与 Maven 有关):

*Description Resource Path Location Type Missing artifact com.cloud.com.f5:icontrol:jar:1.0 pom.xml /cloud-plugin-network-f5 line 30 Maven Dependency Problem

*Description Resource Path Location Type Missing artifact com.cloud.com.netapp:manageontap:jar:4.0 pom.xml /cloud-plugin-netapp line 30 Maven Dependency Problem

*Description Resource Path Location Type Missing artifact com.cloud.com.vmware:vmware-vim25:jar:6.0 pom.xml /cloud-engine-storage-integration-test line 12 Maven Dependency Problem

*Description Resource Path Location Type Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-plugin-plugin:3.1:descriptor (execution: default-descriptor, phase: process-classes) pom.xml /Wix-cloudstack-maven-plugin line 16 Maven Project Build Lifecycle Mapping Problem

*Description Resource Path Location Type The container 'Maven Dependencies' references non existing library 'C:\Users.m2\repository\com\cloud\com\f5\icontrol\1.0\icontrol-1.0.jar' cloud-plugin-network-f5 Build path Build Path Problem

*Description Resource Path Location Type The import com.cloud.network.schema cannot be resolved BrocadeVcsApi.java /cloud-plugin-network-vcs/src/com/cloud/network/brocade line 61 Java Problem

最佳答案

可能有点晚了,但可能会帮助其他第一次尝试这个的人。

添加 Apache Maven 存储库应该允许您进行构建,例如我已使用 CloudStack 4.13 添加了 Maven Central 和 Apache Maven 存储库。

这可以通过编辑 ~/.m2/settings.xml 以包含镜像来完成,使用 HTTPS 而不是 HTTP 很重要,因为这已被弃用,并且默认情况下会导致失败。

Apache 存储库条目

要添加到配置中的条目。

    <mirror>
<id>Apache HTTPS</id>
<mirrorOf>apache</mirrorOf>
<name>Apache (HTTPS)</name>
<url>https://repo.maven.apache.org/maven2/</url>
</mirror>

示例

仅镜像用户的条目。

<settings>
<mirrors>
<mirror>
<id>Central HTTPS</id>
<mirrorOf>central</mirrorOf>
<name>Maven Central (HTTPS)</name>
<url>https://repo1.maven.org/maven2/</url>
</mirror>
<mirror>
<id>Apache HTTPS</id>
<mirrorOf>apache</mirrorOf>
<name>Apache (HTTPS)</name>
<url>https://repo.maven.apache.org/maven2/</url>
</mirror>
</mirrors>
</settings>

关于java - 导入时打开项目时出错(maven dep,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56065251/

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