构建购物者时出错

时间:2015-09-05 06:37:57

标签: 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> 

我确实经历了这个论坛上关于购物者构建的唯一一个问题,但那里提供的解决方案并没有解决我的问题。

我希望这个问题的解决方案可以帮助那些试图根据自己的需求定制购物者的人,也可以帮助那些刚刚开始使用Java企业应用程序开发的人。

希望得到一些帮助。感谢您的合作。

1 个答案:

答案 0 :(得分:0)

我之前遇到过这个问题,经过一番研究后发现shopizer-2.0.2存在一些问题。它更好的尝试使用早期版本,即shopizer-2.0.1。试着看看它是否解决了这个问题。