【问题标题】:Maven parent.relativePath of POM SNAPSHOT points at new parent instead of old parent errorPOM SNAPSHOT 的 Maven parent.relativePath 指向新父级而不是旧父级错误
【发布时间】:2020-06-22 13:13:20
【问题描述】:

我在 Eclipse 中构建时遇到问题,其中子项目的主要工件不是父级,而是另一个 pom.xml 文件。

真正的问题在于孩子们所指的旧 pom.xml 文件工件实际上在文件夹结构中,但 maven 尝试从存储库下载它。

这是一个本地 pom.xml 文件,对应于项目的旧版本。

有办法解决这个问题吗?

[DEBUG] Using local repository at C:\Users\user\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\user\.m2\repository
[INFO] Scanning for projects...
[DEBUG] Could not find metadata com.company:oldparent:1.0-SNAPSHOT/maven-metadata.xml in local (C:\Users\user\.m2\repository)
[DEBUG] Failure to find com.company:oldparent:1.0-SNAPSHOT/maven-metadata.xml in https://dl.bintray.com/spark-packages/maven/ was cached in the local repository, resolution will not be reattempted until the update interval of spark-package has elapsed or updates are forced
[DEBUG] Could not find metadata com.company:oldparent:1.0-SNAPSHOT/maven-metadata.xml in local (C:\Users\user\.m2\repository)
[DEBUG] Extension realms for project com.company:projname:pom:1.0-SNAPSHOT: (none)
[DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[DEBUG] Extension realms for project com.company:sparkapps:pom:1.0-SNAPSHOT: (none)
[DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[DEBUG] Extension realms for project com.company:utils:pom:1.0-SNAPSHOT: (none)
[DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[DEBUG] Extension realms for project com.company:oozie:pom:1.0-SNAPSHOT: (none)
[DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'parent.relativePath' of POM com.company:feature1:1.0-SNAPSHOT (C:\Users\user\Desktop\PROJ_GIT\main_path\sub_path\sparkapps\feature1\pom.xml) points at com.company:sparkapps instead of com.company:oldparent, please verify your project structure @ line 11, column 13
[FATAL] Non-resolvable parent POM for com.company:feature1:1.0-SNAPSHOT: Failure to find com.company:oldparent:pom:1.0-SNAPSHOT in https://dl.bintray.com/spark-packages/maven/ was cached in the local repository, resolution will not be reattempted until the update interval of spark-package has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 11, column 13
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.holdenkarau:spark-testing-base_2.11:jar -> duplicate declaration of version (?) @ line 107, column 21
[WARNING] 'parent.relativePath' of POM com.company:feature3:1.0-SNAPSHOT (C:\Users\user\Desktop\PROJ_GIT\main_path\sub_path\sparkapps\feature2\pom.xml) points at com.company:sparkapps instead of com.company:oldparent, please verify your project structure @ line 11, column 13
[FATAL] Non-resolvable parent POM for com.company:feature3:1.0-SNAPSHOT: Failure to find com.company:oldparent:pom:1.0-SNAPSHOT in https://dl.bintray.com/spark-packages/maven/ was cached in the local repository, resolution will not be reattempted until the update interval of spark-package has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 11, column 13
[

【问题讨论】:

    标签: eclipse scala maven


    【解决方案1】:

    在同事的帮助下找到了解决方案: 这里的问题是您首先需要“maven install”首先需要的模块并且必须按顺序排列。 编译完这些快照后,您就可以编译下一个模块了。

    【讨论】:

      猜你喜欢
      • 2016-07-26
      • 2014-12-12
      • 2017-05-05
      • 2015-08-14
      • 1970-01-01
      • 2013-11-24
      • 1970-01-01
      • 1970-01-01
      • 2013-01-25
      相关资源
      最近更新 更多