在maven项目中使用install命令报如下异常
[ERROR] The project com.bjsxt.portal:flower-portal:0.0.1-SNAPSHOT (H:\Workspac
es\MyEclipse\flower-portal\pom.xml) has 1 error
[ERROR] Child module H:\Workspaces\MyEclipse\flower-portal\flower-web of H:\
Workspaces\MyEclipse\flower-portal\pom.xml does not exist
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
原因是web子项目无法被parent项目找到,所以无法install,缺少0.0.1-SNAPSHOT文件
在网上搜索许多相关帖子都无法解决问题,后来仔细检查parant项目的pom.xml文件,发现<modules>标签下的web子项目的<module>标签为<module>flower-web</module>,
实际的web项目名为flower-web Maven Webapp,而在parent项目pom.xml中系统自动生成的<module>标签中使用的是artifactId名,所以才会报错,将其修改为flower-web Maven Webapp后正常。