maven聚合项目总体步骤,顺序可变:
出现的异常:
1.点击两次逆向工程生成的配置文件,所有的mapper文件都会产生两次,打包时会报错。
解决方案:删除mapper文件夹重新生成逆向文件
2.父工程中的pom.xml文件中modules标签中的module是唯一的如果是以下
<modules> <module>ttcommon</module> <module>ttmanagerdao</module> <module>ttmanagerdao</module> <module>ttmanagerservice</module> <module>ttitemweb</module> <module>ttmanagerweb</module> </modules>
会报以下错误:
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 378, column 15
[ERROR] 'modules.module[2]' specifies duplicate child module ttmanagerdao @ line 11, column 13
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.zyp.service:bigproject2:1.0 (D:\zyp\IdeaWorkSpace\bigproject2\pom.xml) has 1 error
[ERROR] 'modules.module[2]' specifies duplicate child module ttmanagerdao @ line 11, column 13
[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
解决方案:删除重复的module标签
后续......