maven 分模块 子模块编译出错

刘岗强 2015-11-04 03:34:56

项目目录是这样的 web子项目引用了utils和core
编译时出错如下求大神帮忙

[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.qitian:benpaobang-web:war:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ com.qitian:benpaobang-parent:0.0.1-SNAPSHOT, E:\Eclipse\benpaobang-parent\pom.xml, line 11, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building benpaobang-web Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.525 s
[INFO] Finished at: 2015-11-04T15:36:16+08:00
[INFO] Final Memory: 9M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project benpaobang-web: Could not resolve dependencies for project com.qitian:benpaobang-web:war:0.0.1-SNAPSHOT: Failed to collect dependencies at com.qitian:benpaobang-core:jar:0.0.1-SNAPSHOT: Failed to read artifact descriptor for com.qitian:benpaobang-core:jar:0.0.1-SNAPSHOT: Could not find artifact com.qitian:benpaobang-parent:pom:0.0.1-SNAPSHOT -> [Help 1]
[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/DependencyResolutionException
...全文
157 点赞 收藏 2
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
刘岗强 2015-11-04
能给个扣扣么 我的912554737 咨询下你
回复
eewcee 2015-11-04
LZ 我建议把parent也作为一个单独的project拉出来。
如这样:

一般我们实际使用中parent放项目依赖顺序,用于整体打包。
再建一个shared工程,方不同的目录配置,以及资源文件,这部分的功能也可以放parent里面,看个人喜好了。

另外,建议附一下你的几个pom.xml方便大家定位问题。
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2015-11-04 03:34
社区公告
暂无公告