2013-08-27 95 views
0

我正在尝试添加依赖项以满足我正在处理的项目中定义的父项目。我已经尝试将这些依赖项复制到我的本地存储库的其余部分所在的文件夹中,如Maven自动填充;并编写一个用户设置XML定义了一个本地存储库,其中存储我需要添加的文件。但是我收到以下错误。无法使用Maven解析本地依赖关系

的settings.xml

<settings> 
     <localRepository>[path to dependencies]</localRepository> 
    <offline>true</offline> 
</settings> 

错误:

Non-resolvable parent POM: Failure to find com.vmware.rabbitmq:rabbitmq-training-parent:pom:1.0.0 in http://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 @ line 6, column 10 -> [Help 2]

我怎样才能手动将文件添加到我的本地仓库?

回答

2

在Maven网站上有一个guide如何做到这一点。您需要运行以下命令:

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> 
-DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging> 
+0

我在搜索答案时误解了这些说明。感谢给我的链接,并引用了说明。 – cyotee

相关问题