今天学习在本地搭建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. Druid 配置_LogFilter

    Druid内置提供了四种LogFilter(Log4jFilter.Log4j2Filter.CommonsLogFilter.Slf4jLogFilter),用于输出JDBC执行的日志.这些Filt ...

  2. java获取指定日期之前或之后的时间

    /** * 前/后?分钟 * * @param d * @param minute * @return */ public static Date rollMinute(Date d, int min ...

  3. 关于String 后面跟省略号。。。

    今天阅读MonkeyRunner源码的时候发现下面一段: private String shell(String... args) { StringBuilder cmd = new StringBu ...

  4. arcgis python图形信息

    属性 说明 area 面要素的面积值:对于所有其他要素类型为空 centroid 如果质心位于要素之内或要素之上则为真:否则返回标注点(返回一个点对象) 范围 返回一个范围对象 firstPoint ...

  5. UML建模工具Visio 、Rational Rose、PowerDesign的比较

    UML建模工具Visio .Rational Rose.PowerDesign的比较   ROSE是直接从UML发展而诞生的设计工具,它的出现就是为了对UML建模的支持,ROSE一开始没有对数据库端建 ...

  6. CentOS6.5配置网络

    [ CleverCode发表在csdn博客中的原创作品,请勿转载.原创地址:http://blog.csdn.net/clevercode/article/details/46376985] 1 网卡 ...

  7. 黑马day16 jquery入门

    jquery: 1.jQuery 对象就是通过jQuery包装DOM对象后产生的对象. jQuery对象是jQuery独有的.假设一个对象是jQuery对象,那么它就能够使用jQuery里的方法:$( ...

  8. python的异常机制使用技巧

    1.当你开发的接口被其他应用调用时,响应要及时,但是有些要触发的操作很耗时间. 比如下面需要通过被调用触发的函数create_job_1().但是这个函数执行会比较消耗时间 2.于是,我们可以利用异常 ...

  9. [转]awk使用手册

    awk 手册 简体中文版由bones7456 (bones7456@gmail.com)整理. 原文:应该是 http://phi.sinica.edu.tw/aspac/reports/94/940 ...

  10. Flume目录

    1. Flume的安装配置 2. flume和kafka整合(转) 3. Flume NG 配置详解(转) 4. Flume-NG一些注意事项(转) 5. FLume监控文件夹,将数据发送给Kafka ...