【发布时间】:2015-12-01 07:59:45
【问题描述】:
我想定制 shopizer 电子商务。从 github 下载源代码版本 2.0.2 后,我使用“现有 Maven 项目”的导入选项将项目导入 eclipse luna。
跟随入门文档,但出现以下构建错误:-
[INFO] Scanning for projects...
[ERROR] The build could not read 4 projects -> [Help 1]
[ERROR]
[ERROR] The project com.shopizer:sm-core:2.0.2-SNAPSHOT (E:\shopizer- 2.0.2\shopizer\sm-core\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find com.shopizer:shopizer:pom:2.0.2-SNAPSHOT in http://maven.springframework.org/snapshot was cached in the local repository, resolution will not be reattempted until the update interval of org.springframework.maven.snapshot has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 6, column 11 -> [Help 2]
[ERROR]
[ERROR] The project com.shopizer:sm-core-model:2.0.2-SNAPSHOT (E:\shopizer-2.0.2\shopizer\sm-core-model\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find com.shopizer:shopizer:pom:2.0.2-SNAPSHOT in http://maven.springframework.org/snapshot was cached in the local repository, resolution will not be reattempted until the update interval of org.springframework.maven.snapshot has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 7, column 10 -> [Help 2]
[ERROR]
[ERROR] The project com.shopizer:sm-core-modules:2.0.2-SNAPSHOT (E:\shopizer-2.0.2\shopizer\sm-core-modules\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find com.shopizer:shopizer:pom:2.0.2-SNAPSHOT in http://maven.springframework.org/snapshot was cached in the local repository, resolution will not be reattempted until the update interval of org.springframework.maven.snapshot has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 6, column 11 -> [Help 2]
[ERROR]
[ERROR] The project com.salesmanager:sm-shop:2.0.2-SNAPSHOT (E:\shopizer-2.0.2\shopizer\sm-shop\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find com.shopizer:shopizer:pom:2.0.2-SNAPSHOT in http://maven.springframework.org/snapshot was cached in the local repository, resolution will not be reattempted until the update interval of org.springframework.maven.snapshot has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 6, 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
这些是我在将项目导入 eclipse 后遵循的步骤:-
1) 右键单击作为主要父项目的 shopizer 并运行 maven clean install ,我正在使用 maven 插件进行 Eclipse 即 m2e 。
2 ) 构建错误说有一个不可解析的父 pom ,我试图通过在这个多模块项目的 4 个子模块中提供一个相对路径元素来解决这个问题,但没有帮助。
我还可以看到一些版本差异,比如父 pom 有
<groupId>com.shopizer</groupId>
<artifactId>shopizer</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
其中版本为 0.0.1-SNAPSHOT 但子模块的父元素有此条目
<parent>
<groupId>com.shopizer</groupId>
<artifactId>shopizer</artifactId>
<version>2.0.2-SNAPSHOT</version>
</parent>
我确实解决了这个论坛上关于 shopizer 构建的唯一一个问题,但那里提供的解决方案并没有解决我的问题。
我希望这个问题的解决方案可以帮助其他尝试自定义 shopizer 以满足自己的需求的人,也可以帮助其他刚开始进行 Java 企业应用程序开发的人。
希望得到一些帮助。感谢您的合作。
【问题讨论】:
-
尝试新的
2.0.3
标签: shopizer