Eclipse使用Maven创建Web时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype

原文:https://blog.csdn.net/afgasdg/article/details/12757433

我的解决办法:

1. Setting.xml文件配置出了问题

文件目录:maven的安装路劲/conf下,如我的“G:\Maven_1903\apache-maven-3.6.0\conf”,我的配置如下所示,采用的是阿里的远程仓库;

<mirrors>
	<mirror>
		<id>aliyun</id>
		<name>aliyun</name>
		<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
		<mirrorOf>central</mirrorOf>
	</mirror>
</mirrors>
<profile>
	<id>nexus</id>
	<repositories>
		<repository>
			<id>central</id>
			<url>http://repo.maven.apache.org/maven2</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>ansj-repo</id>
			<name>ansj Repository</name>
			<url>http://maven.nlpcn.org/</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>
</profile>
 
<activeProfiles>
	<activeProfile>nexus</activeProfile>
</activeProfiles>

2. 遇到pom.xml上面报错,错误信息:

Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 

解决办法:可见:https://blog.csdn.net/weixin_39533410/article/details/80059707#commentBox

说明:找该版本的依赖文件是在c://当前用户目录/.m2/repository/org/apache/maven/plugins\maven-resources-plugin\3.0.2,比如我的:
C:\Users\Thinkpad\.m2\repository\org\apache\maven\plugins\maven-resources-plugin\3.0.2

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值