错误整理:Unable to add module to the current project as it is not of packaging type 'pom'
2013-03-06 17:02
926 查看
今天在eclipse中新建Maven工程,怎么建都报如下错误。
Unable to create project from archetype [org.apache.maven.archetypes:maven-archetype-quickstart:1.1]
Unable to add module to the current project as it is not of packaging type 'pom'
一开始以为是IDE出错了,很是着急,后来回想出错之前的操作。就在这之前,我备份了一个pom文件,然后直接移到了workspace的根目录下,心想是不是这个问题呢?带着疑问,我把这个pom.xml删掉了,然后再创建maven工程,果然不出所料,不再报错了。
为了确保是这个原因,后来google了一下,在国外一个论坛中碰到类似的问题,有个网友的回答摘抄如下:
Are you running the command from a directory that has an existing pom.xml file in it? I think that may be confusing Maven, as it thinks you're trying to add your new project as a sub-module of the project in the working
directory.
原来是因为我在Workspace下放了个POM文件,造成了M2eclipse插件的误解,删掉就OK了。
Unable to create project from archetype [org.apache.maven.archetypes:maven-archetype-quickstart:1.1]
Unable to add module to the current project as it is not of packaging type 'pom'
一开始以为是IDE出错了,很是着急,后来回想出错之前的操作。就在这之前,我备份了一个pom文件,然后直接移到了workspace的根目录下,心想是不是这个问题呢?带着疑问,我把这个pom.xml删掉了,然后再创建maven工程,果然不出所料,不再报错了。
为了确保是这个原因,后来google了一下,在国外一个论坛中碰到类似的问题,有个网友的回答摘抄如下:
Are you running the command from a directory that has an existing pom.xml file in it? I think that may be confusing Maven, as it thinks you're trying to add your new project as a sub-module of the project in the working
directory.
原来是因为我在Workspace下放了个POM文件,造成了M2eclipse插件的误解,删掉就OK了。
相关文章推荐
- 执行 maven 命令 报错Unable to add module to the current project as it is not of packaging type 'pom'
- Unable to add module to the current project as it is not of packaging type 'pom' 问题解决
- Unable to add module to the current project as it is not of packaging type 'pom'
- 错误解决:Unable to add module to the current project as it is not of package
- 错误解决:Unable to add module to the current project as it is not of packagi
- eclipse ERROR: Unable to add module to the current project as it is not of ...
- 'Operation is not valid due to the current state of the object' error during postback
- 错误 the type "xxxx" is defined in an assembly that is not refernced.You must add a reference to assem
- 错误整理:No plugin found for prefix 'jetty' in the current project and in the plugin groups
- monogame Unable to load DLL 'openal32.dll': The specified module could not be found
- This EntitySet of Type 'Data.Tbl_Student' does not support the 'Add' operation.原因
- 错误:created a ThreadLocal with key of type ……but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
- PHP Warning: date() [function.date]: It is not safe to rely on the system's timezone
- bug:"Operation is not valid due to the current state of the object."
- Unable to get value of the property '2': object is null or undefined
- PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings
- Anaconda下import caffe出现错误TypeError: 'module' object is not callable
- 解决PHP date调用警告:It is not safe to rely on the system's timezone settings
- ASP.NET4.0错误:Operation is not valid due to the current state of the object
- AS.NET2.0 用户控件错误!!The base class includes the field 'MyControl_1', but its type (MyControl) is not compatible with the type of control (ASP.MyControl_ascx).