今天学习在本地搭建Maven工程时,执行了mvn archetype:generate 命令,报错。

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了。

转自:http://blog.csdn.net/yang_734664103/article/details/15783745

执行 maven 命令 报错Unable to add module to the current project as it is not of packaging type 'pom'[转]的更多相关文章

  1. Maven实战错误笔记:使用mvn archetype:generate报错:Unable to add module to the current project as it is not of packaging type 'pom'

    在使用mvn archetype:generate生成Maven实战03:HelloWorld中的HelloWorld的项目骨架时报了这个错,从字面上分析是可能与pom.xml文件有关,然后我看了一下 ...

  2. 执行yum命令报错"Unable to connect to Registration Management Service"

    问题描述 linux上执行yum相关命令时,报无法连接到注册管理服务的错误,具体报错信息如下 [root@aijihe-core-zy-2-3 ~]# yum install gcc Loaded p ...

  3. eclipse ERROR: Unable to add module to the current project as it is not of ...

    原因: Workspace下放了个POM文件,造成了M2eclipse插件的误解. 解决方案: 删掉就OK了.

  4. Python3安装Celery模块后执行Celery命令报错

    1 Python3安装Celery模块后执行Celery命令报错 pip3 install celery # 安装正常,但是执行celery 命令的时候提示没有_ssl模块什么的 手动在Python解 ...

  5. [RN] React Native 使用 react-navigation 报错 "Unable to resolve module `react-native-gesture-handler`

    在React Native 使用 react-navigation 过程中,报错 "Unable to resolve module `react-native-gesture-handle ...

  6. 【mlflow】执行import mlflow 报错:ImportError: No module named 'pkg_resources'

    命令行运行 python -c “import mlflow” 的时候报错: ImportError: No module named 'pkg_resources' 结果发现是因为本地有一个文件夹叫 ...

  7. Maven执行Reimport命令报错:See logs for details

    Idea版本:2018.1.3 maven版本:3.6.2 Idea配置了本地下载的maven之后,不管是直接执行maven的Reimport命令,还是使用idea的Reimport按钮,都会报这个错 ...

  8. Visual Studio发布Web项目报错:Unable to add 'xxx' to the Web site. Unable to add file 'xxx'. The specified file could not be encrypted.

    背景 Visual Studio下的Web项目 现象 发布时遇到Unable to add 'xxx' to the Web site.  Unable to add file 'xxx'. The ...

  9. 关于ubuntu上执行错误命令报错

    Sorry, command-not-found has crashed! 新安装了一台ubuntu server 安装时用中文安装的,之后命令行下各种乱码,最后也不知道是修改哪里造成的 每次执行一次 ...

随机推荐

  1. Java常量字符串String理解 String理解

    以前关于String的理解仅限于三点:1.String 是final类,不可继承2.String 类比较字符串相等时时不能用“ == ”,只能用  "equals" 3.Strin ...

  2. DLL Dynamic-Link Library Search Order

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx A system can contain ...

  3. WinForm中DataGridView验证单元格输入的是数字

    转载:http://www.cnblogs.com/ganqiyin/archive/2013/02/18/2915491.html 事件:DataGridView验证单元格输入的是数字,DataGr ...

  4. linux上SVN解决冲突的办法

    转载:http://www.aixchina.net/club/thread-25902-1-1.html 这里,先说说冲突解决. 怎么会发生冲突呢? 两个人修改了不同文件?不会有冲突,他们不相关. ...

  5. .NET:遇到并发问题,什么样的情况下需要自动重试?

    背景 多用户系统会出现并发问题,应对并发问题的两种方式是“悲观锁”和“乐观锁”,多数情况下都会采用“乐观锁”,这引发了一个问题,如果检查出乐观并发异常如何重试?是让最终用户手工重试?还是让系统自动重试 ...

  6. Oracle数据库常用函数使用--持续更新中

    NVL函数.NVL( string1, replace_with).如果string1为NULL,则NVL函数返回replace_with的值,否则返回原来的值. INSTR函数.用于查找指定字符串是 ...

  7. Android学习进阶和IoC

    1.成为Android高手一般分为六个阶段: 第一阶段:熟练掌握Java SE,尤其是对其内部类.线程.并发.网络编程等需要深入研究:熟练掌握基于HTTP协议的编程,清楚POST和GET等请求方式流程 ...

  8. 仿LOL项目开发第三天

    仿LOL项目开发第二天 by草帽 昨个我们已经实现了下载功能,但是发现没有,下载的包是压缩的,没有解压开,那么Unity是识别不了的. 所以今个我们来讲讲如何实现解压文件. 还记得吗,我们在Downl ...

  9. iOS:CoreData数据库的使用四(数据库和UITableViewController以及NSFetchedResultsController一起使用)

    CoreData数据库虽然可以和tableview或者UITableViewController一起使用将数据显示在表格上,但是在准备数据的时候,这种方式需要用一个可变数组来装从数据库一次性取出来的所 ...

  10. C#实现两个数据库之间的数据上报

    用VS2008实现本地数据库上传数据到远程数据.数据能够是一个表,或一个表的部分数据.或查询数据.或数据编辑后上传. 其他VS版本号.复制当中代码就能够.未使用其他不论什么插件.有具体凝视. 单独页面 ...