在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
[

发布于 2020-06-25 17:20:14
在collegue的帮助下找到了解决方案:这里的问题是你首先需要"maven install“模块,并且这些模块必须是有序的。一旦这些快照被编译,你就可以编译下一个模块了。
https://stackoverflow.com/questions/62515307
复制相似问题