java - Maven:在 POM 不可解析的父级上出现错误

标签 java ios macos maven

我在尝试运行 mvn 命令时遇到问题。这就是我正在做的事情:

    enaxromac:ios enaxro$ mvn -f TTTTT/pom.xml
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.xxxxxx.xxxxxx.ios.xxxxxx:xxxx:2.0.0-SNAPSHOT (/Users/enaxro/projects/xxxxx/main/xxxxxx/xxx/xxxxxxx/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.xxxxx.xxxxx.ios:root:2.0.0-SNAPSHOT: Failure to find com.xxxxx.maven.parent:legacy:pom:1.0.11 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 @ com.xxxx.xxxxxx.ios:root:2.0.0-SNAPSHOT, /Users/enaxro/projects/xxxx/main/xxxxx/ios/pom.xml, line 3, column 13 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

我的设置如下:

enaxromac:ios enaxro$ mvn --version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500)
Maven home: /usr/share/maven
Java version: 1.6.0_37, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"

最佳答案

检查您的settings.xml 文件。应该在

<Userdir>/.m2 

存储库目录旁边的目录。这是我们收到不可解决的父错误的主要原因之一。另外,对于其他可能的解决方案,请查看这篇文章: http://java.dzone.com/articles/mavens-non-resolvable-parent

关于java - Maven:在 POM 不可解析的父级上出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15400787/

相关文章:

ios - return语句在switch中如何工作?

ios - NSAttributedString 在本地化时是否仍然保留其属性?

macos - Android 模拟器 GenyMotion(带 VirtualBox)导致 New 1 3'' Macbook Pro Yosemite 10.10.2 崩溃

swift - 尝试将 NSPopupButton 的 `` `enabled ``` 属性绑定(bind)到复选框的状态

java - Android 接收 null Parcelable 对象

java - 使用反射获取 Field 的通用类型

css - iOS 解决方法 : Smooth scrolling without the CSS property Scroll Behavior: Smooth?

java - 对 C/C++ 对象和 C/C++ 对象对 Java/Objective C 的 JSON 响应

java - 由 org.gdal.ogr.ogrJNI.GetDriverCount() 引起的 UnsatisfiedLinkError

macos - OSX 上的 OpenCV - 如何使用辅助摄像头而不是默认摄像头