myeclipse中使用maven构建多模块项目

purensong333 2015-05-31 10:34:12
问题如下
我打算用maven构建多模块项目,父级项目是mblog_parent打包方式是pom,core,entity是jar包,web是war包,想问下大家这个报错信息说web这个项目哪有问题。我看到CSDN有人解决了,但我按照他们说的查看了jdk都没问题啊。我jdk版本是1.7的。
[INFO] mblogweb parent .................................... SUCCESS [ 0.641 s]
[INFO] mblog_core ......................................... SUCCESS [ 1.896 s]
[INFO] mblog_entity ....................................... SUCCESS [ 0.125 s]
[INFO] mblog_web .......................................... FAILURE [ 1.577 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.642 s
[INFO] Finished at: 2015-05-31T10:29:14+08:00
[INFO] Final Memory: 13M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project mblog_web: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.4:war failed: basedir D:\myeclipse_workspace\mblog_parent\mblog_web\WebContent does not exist -> [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/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :mblog_web
再附上mblog_parent中的pom.xml配置信息
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<webResources>
<resource>
<directory>WebContent</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
大神们快来帮我分析一下
...全文
2514 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
docuxu 2017-09-14
  • 打赏
  • 举报
回复
请问多模块怎么导入啊 我导入是个分开几个项目了 没有效果
purensong333 2015-05-31
  • 打赏
  • 举报
回复
引用 1 楼 net_lover 的回复:
D:\myeclipse_workspace\mblog_parent\mblog_web\WebContent does not exist D:\myeclipse_workspace\mblog_parent\mblog_web\WebContent文件夹不存在
恩,我把配置里的webcontent改成了webroot,install成功了,谢谢
purensong333 2015-05-31
  • 打赏
  • 举报
回复
有的啊
孟子E章 2015-05-31
  • 打赏
  • 举报
回复
D:\myeclipse_workspace\mblog_parent\mblog_web\WebContent does not exist D:\myeclipse_workspace\mblog_parent\mblog_web\WebContent文件夹不存在

2,100

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧