解决:No archetype found in remote catalog. Defaulting to internal catalog

时间:2024-04-10 18:30:07

新建Maven项目,遇到警告:
No archetype found in remote catalog. Defaulting to internal catalog
Archetype not found in any catalog. Falling back to central repository.
Add a repository with id ‘archetype’ in your settings.xml if archetype’s repository is elsewhere.
解决:No archetype found in remote catalog. Defaulting to internal catalog

解决办法:
1.下载archetype-catalog.xml
下载地址:http://repo1.maven.org/maven2/archetype-catalog.xml
2.存放到仓库根目录
例如我的仓库是.m2\repository,则放到.m2\repository\archetype-catalog.xml
3.添加参数-DarchetypeCatalog=local
IDEA设置方法:
File=> Other Settings=> Settings for New Projects=> Build,Execution,Deployment=> Build Tools=> Maven=> Runner=>
VM Options=> 填写为“-DarchetypeCatalog=local”
解决:No archetype found in remote catalog. Defaulting to internal catalog