【发布时间】:2015-08-03 14:09:04
【问题描述】:
我有一个来自 Github 的 maven 项目,我将其 fork,然后将其导入 eclipse。它包含三个 Maven 模块。我添加了第五个。
现在我想将这第五个(新)作为依赖项添加到以前的模块之一。
我在 maven 中进行了安装,并将 jar 放在我的本地存储库中。现在,当我将依赖项添加到以前的模块之一时,我收到错误消息,即我的新模型在公共依赖项中不存在。我的意思是:
Failed to execute goal on project moquette-broker: Could not resolve dependencies for project org.eclipse.moquette:moquette-broker:jar:0.7: Failure to find org.eclipse.moquette:moquette-configurationmanager:jar:0.7 in https://repo.eclipse.org/content/repositories/paho-releases/ was cached in the local repository, resolution will not be reattempted until the update interval of Paho Releases has elapsed or updates are forced -> [Help 1]
我的问题是如何告诉 eclipse 在我的本地存储库中进行搜索?
我尝试将我的依赖项上传到公共存储库,但它现在没有任何意义,因为我仍在开发中
你能帮忙吗
我本地存储库中的 jar
这是我为了调用我的新模块而放入 pom 中的内容
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>moquette-configurationmanager</artifactId>
<version>${project.version}</version>
<scope>Test</scope>
</dependency>
【问题讨论】:
-
你试过 mvn clean install -U 吗?
-
您是否检查过安装是否正常,并创建了文件
$userprofile/.m2/repository/org/eclipse/moquette/moquette-broker/0.7/moquette-broker-0.7.jar? -
@JFPicard 是的,我遇到了同样的错误,即
Failed to execute goal on project moquette-broker: Could not resolve dependencies for project org.eclipse.moquette:moquette-broker:jar:0.7: Could not find artifact org.eclipse.moquette:moquette-configurationmanager:jar:0.7 in Paho Releases (https://repo.eclipse.org/content/repositories/paho-releases/) -> [Help 1] -
@LittleSanti 是的,我检查过了,它在同一个位置。肉眼可以看到
-
你能发布你的 pom.xml 吗?