美文网首页
001、maven "Generating project in

001、maven "Generating project in

作者: airkisser | 来源:发表于2017-02-28 22:52 被阅读0次

问题描述

执行 archetype:generate 的时候,会产生
[INFO] Generating project in Batch mode
然后就一直阻塞在这里

解决方法

1、下载archetype-catalog.xml文件,下载地址: http://repo1.maven.org/maven2/archetype-catalog.xml
2、把文件archetype-catalog.xml复制到目录${localRepository}\org\apache\maven\archetype\archetype-catalog\2.x下面,localRepository路径根据实际情况而定
3、如果使用命令行创建Maven项目,需要在mvn archetype:generate命令后面加参数-DarchetypeCatalog=local-DarchetypeCatalog=internal,表示创建时读取本地archetype-catalog.xml文件
4、使用Itellij Idea创建Maven项目,则需要进行如下配置

  • 打开Other Settings>Default Settings


    Default Settings
  • 找到Maven>Runner,并添加VM参数:-DarchetypeCatalog=internal


    配置VM参数

相关文章

网友评论

      本文标题:001、maven "Generating project in

      本文链接:https://www.haomeiwen.com/subject/psvfgttx.html