我打算用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>
大神们快来帮我分析一下
4 个解决方案
#1
D:\myeclipse_workspace\mblog_parent\mblog_web\WebContent does not exist
D:\myeclipse_workspace\mblog_parent\mblog_web\WebContent文件夹不存在
D:\myeclipse_workspace\mblog_parent\mblog_web\WebContent文件夹不存在
#2
有的啊
#3
恩,我把配置里的webcontent改成了webroot,install成功了,谢谢
#4
请问多模块怎么导入啊 我导入是个分开几个项目了 没有效果
#1
D:\myeclipse_workspace\mblog_parent\mblog_web\WebContent does not exist
D:\myeclipse_workspace\mblog_parent\mblog_web\WebContent文件夹不存在
D:\myeclipse_workspace\mblog_parent\mblog_web\WebContent文件夹不存在
#2
有的啊
#3
恩,我把配置里的webcontent改成了webroot,install成功了,谢谢
#4
请问多模块怎么导入啊 我导入是个分开几个项目了 没有效果