idea报错
意思就是在本地仓库中少了archetype-catalog.xml文件
解决方法
- 在maven的conf/setting.xml里面除了阿里云仓库在加个中央仓库,有时候阿里仓库有些文件是没有的,也会报错
如: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,
加上中央仓库也能防止其他错误产生
<!-- 阿里仓库 -->
<mirror>
<id>aliyun-maven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun-public</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
<!-- 中央仓库1 -->
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>repo1-maven</name>
<url>https://repo1.maven.org/maven2/</url>
</mirror>
</mirrors>
- 运行mvn archetype:crawl命令生成对应的xml,用别人的xml文件竟然还有要收费的
mvn archetype:crawl
- 还有个warning,设置使用本地catalog文件就行了,配置 -DarchetypeCatalog=local