gpt4 book ai didi

java - Maven - 无法使用 Maven 模板创建项目

转载 作者:行者123 更新时间:2023-11-30 04:00:50 25 4
gpt4 key购买 nike

我正在尝试使用命令 propmt 中的 Maven 模板创建 Maven 项目。但看起来下载 jar 和 gatting 失败。 Maven 版本是 3.2.1。请告知为什么会发生这种情况?

C:\workspace>mvn archetype:generate -DgroupId=com.mkyong -DartifactId=CounterWebApp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false[INFO] 正在扫描项目...
下载:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[警告] 无法检索 org.apache.maven.plugins:maven-clean-plugin:2.5 的插件描述符:插件 org.apache.maven.plugins:maven-clean-plugin
:2.5 或其依赖项之一无法解析:无法读取 org.apache.maven.plugins:maven-clean-plugin:jar:2.5 的 Artifact 描述符
下载:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
[警告] 无法检索 org.apache.maven.plugins:maven-install-plugin:2.4 的插件描述符:插件 org.apache.maven.plugins:maven-install-pl
ugin:2.4 或其依赖项之一无法解析:无法读取 org.apache.maven.plugins:maven-install-plugin:jar:2 的 Artifact 描述符。
4
下载:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
[警告] 无法检索 org.apache.maven.plugins:maven-deploy-plugin:2.7 的插件描述符:插件 org.apache.maven.plugins:maven-deploy-plug
in:2.7 或其依赖项之一无法解析:无法读取 org.apache.maven.plugins:maven-deploy-plugin:jar:2.7 的 Artifact 描述符
下载:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.pom

最佳答案

您正在使用代理吗?如果是这样,您可以检查 %MAVEN_HOME%/conf/settings.xml 中的代理配置

 <proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host></host>
<port></port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>

您似乎无法连接到 Maven 存储库

关于java - Maven - 无法使用 Maven 模板创建项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22020231/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com