警告提示:No archetype found in remote catalog. Archetype not found in any catalog
IDEA 使用 archetype(原型/模板/骨架)创建 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.
原因:
找不到远程的 archetype-catalog.xml,在内部的 archetype 目录册中也找不到你要的 archetype,建议你在 settings.xml 中配置 archetype 仓库。
实际上在 http://repo1.maven.org/maven2/ 仓库存在 archetype-catalog.xml 文件,下载地址:https://repo1.maven.org/maven2/archetype-catalog.xml。
但是我在 settings.xml 声明这个远程仓库后,
<mirror><id>repo1</id><name>Human Readable Name for this Mirror.</name><url>http://repo1.maven.org/maven2/</url><mirrorOf>central</mirrorOf>
</mirror>
在命令终端输入命令 mvn archetype:generate 同样会提示下面的警告信息:
[WARNING] No archetype found in remote catalog. Defaulting to internal catalog
我没有理解 No archetype found in remote catalog 这段文字的含义。
临时解决:
我点击上述的 archetype-catalog.xml 下载链接,下载了 archetype-catalog.xml 文件。
将 archetype-catalog.xml 文件移动到 ~/.m2/repository 目录下(本地仓库的根目录),然后 IDEA 中配置下面的参数:
然后 IDEA 使用 archetype 创建 Maven 项目,就没有上面的提示了。
其实上面的做法只是屏蔽了访问远程仓库的 catalog 而已,指定 IDEA 通过 archetype 创建项目的时候,只读取本地的 catalog。
默认是先查询远程的,再查询本地的,再查询内置的。
命令行下,你可以使用参数 archetypeCatalog=local,表示只读取本地的 catalog。参数值有三个:remote、local、internal。
[~/documents/ideaprojects]$ mvn archetype:generate -DarchetypeCatalog=local
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.2.1:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.2.1:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.2.1:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: local -> am.ik.archetype:elm-spring-boot-blank-archetype (Blank multi project for Spring Boot + Elm)
2: local -> am.ik.archetype:graalvm-blank-archetype (Blank project for GraalVM)
3: local -> am.ik.archetype:graalvm-springmvc-blank-archetype (Blank project for GraalVM + Spring MVC)
4: local -> am.ik.archetype:graalvm-springwebflux-blank-archetype (Blank project for GraalVM + Spring MVC)
5: local -> am.ik.archetype:maven-reactjs-blank-archetype (Blank Project for React.js)
...
执行上述的命令后,你在命令终端可以看到所有可用的 archetype 列表,你需要输入对应的编号,然后按下回车键,那么 Maven 就会按你选择的 archetype 在当前目录下生成项目的整体结构。如果你需要使用 IDE 来开发项目,那么你需要导入该项目。
警告提示:No archetype found in remote catalog. Archetype not found in any catalog相关推荐
- 解决maven创建中的警告:No archetype found in remote catalog. Defaulting to internal catalog.问题
新建maven项目时出现警告:No archetype found in remote catalog. Defaulting to internal catalog.报错. 解决方法: 1. 下载a ...
- 警告:No archetype found in remote catalog. Defaulting to internal catalo在远程目录中没有找到原型。默认为内部编录
问题: 新建maven项目时,Run中报警告:No archetype found in remote catalog. Defaulting to internal catalo在远程目录中没有找到 ...
- [WARNING] No archetype found in remote catalog. Defaulting to internal catalog(已解决)
前言: 遇到问题后,首先,在网络上查找答案.结果告诉我,让我重启IDEA,可是我使用的是CMD命令行,根本没有使用IDEA.或者,告诉我如何操作,却没有解释问题发生的根本原因.于是,我只能去查阅相关文 ...
- Warring:No archetype found in remote catalog. Defaulting to internal catalog
Warring:No archetype found in remote catalog. Defaulting to internal catalog 问题描述:创建maven工程出现问题,No a ...
- No archetype found in remote catalog. Defaulting to internal catalog 原因 与 解决
No archetype found in remote catalog. Defaulting to internal catalog 翻译:在远程目录中找不到原型, 默认为内部目录 产生原因 我在 ...
- 在新建maven时候遇到错误: No archetype found in remote catalog. Defaulting to internal catalo
在新建maven时候遇到错误: No archetype found in remote catalog. Defaulting to internal catalog[在远程目录中没有找到原型.默认 ...
- 用Anko和Kotlin实现Android上的对话框和警告提示(KAD 24)
作者:Antonio Leiva 时间:Mar 9, 2017 原文链接:https://antonioleiva.com/dialogs-android-anko-kotlin/ 借助Builder ...
- eclipse中去掉警告提示
有时候我们要去掉这些不必要的提示 下面我们来设置去掉这些警告提示 转载于:https://www.cnblogs.com/xiaostudy/p/9370016.html
- Unity3d远程连接Hololens提示Cannot connect without a remote machine address specified
Unity3d版本:2017.2 在Unity3d中使用Holographic Emulation 提示Cannot connect without a remote machine address ...
最新文章
- 使用gparted live分区工具对VMware及ESXI(vsphere)虚拟机进行根目录扩容(可视化界面操作)
- oracle中affirm,2.Oracle Data Guard 参数介绍
- 苹果隐藏app_iOS 14的隐藏功能盘点:不知道等于白更新!
- java程序动态加载jar包,并调用其中的方法
- SizeOf相关代码
- 春节7天新增病毒54万 钓鱼欺诈成最大威胁
- yarn 安装使用小记
- android developer tools下载地址
- 视差角计算公式及其推导
- python识别字母代码_【Python-Opencv】KNN英文字母识别
- IDEA 一直Updating indexes问题解决
- win版石器和linux,石器时代私服架设教程Linux版
- ABAP学习笔记-基础语法-06-流程控制(01)-条件语句
- 史上最全maven setting解读(本地仓库,远程仓库,鉴权等)
- OpenAI完胜DOTA世界冠军,20行python代码带你领略其魅力
- SharePoint 2007部署过程
- 如何在评估机器学习模型时防止数据泄漏
- python打印Excel文件方法
- mysql 读取clob数据类型_谈谈有关各数据库Blob、Clob类型字段的读取、保存更新
- JavaScript基础第六天数组
热门文章
- 查看oracle会话和进程_带有Oracle Digital Assistant和Fn Project的会话式UI。 第三部分,迁移到云...
- ide 日志 乱码_IDE日志分析方法pt。 1个
- java8并行流_Java 8:CompletableFuture与并行流
- maven 部署nexus_设置本地Nexus存储库并从Maven部署WAR文件
- 使用trackBy启动流程
- 通过JavaFX标注制作动画效果
- c#编译时提高兼容性_幻像类型提高了编译时的安全性
- Java Message System简介
- nosql怎么使用_使用NoSQL实施实体服务–第5部分:使用云提高自治性
- 如何将云持久存储添加到JBoss Cool Store