您的位置:首页 > 其它

Unable to add module to the current project as it is not of packaging type 'pom'

2017-10-22 12:02 686 查看
输入mvn archetype:generate -DarchetypeCatalog=internal后,如下报错的几种解决方法(汇总各位网友的)

Unable to add module to the current project as it is not of packaging type 'pom'

1、在Workspace下放了个POM文件,造成了M2eclipse插件的误解,删掉即可。

2、创建一个新的空的目录,执行上面的 maven 命令。如果不是空目录就可能会出现上面错误。

3、在项目根目录下,有个pom.xml,如果在这里构建骨架,又要用pom.xml文件,是会不成功的,就会报Unable to add module to the current project as it is not of packaging type 'pom'这个错,选择在项目目录构建即可。

4、修改主工程目录下的pom文件,设置如下:  <packaging>pom</packaging> 。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  maven package pom
相关文章推荐