普元EOS学习笔记-某些版本的EOS提供的maven获取依赖失败的问题解决

前言

普元EOS的开发包中,提供了maven,因为EOS项目的某些依赖只能从普元官方仓库获取,因此,编译EOS项目必须使用EOS提供的maven。

maven拉取依赖失败

某些版本的EOS提供的maven在编译EOS项目的时候会出现拉取失败的现象。

bash 复制代码
[FATAL] Non-resolvable parent POM for com.primeton.eos:express10:1.0.0: The following artifacts could not be resolved: com.primeton.eos:eos-pom:pom:8.3.1 (absent): Could not transfer artifact com.primeton.eos:eos-pom:pom:8.3.1 from/to primeton-public-repository (http://ge.primeton.com:31100/repository/primeton_public_repositories/): Connect to ge.primeton.com:31100 [ge.primeton.com/101.230.129.77] failed: Connection refused: connect and 'parent.relativePath' points at wrong local POM @ line 4, column 13
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.primeton.eos:express10:1.0.0 (D:\primeton\eos-8.3.1-dev\ide\workspace\express10\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.primeton.eos:express10:1.0.0: The following artifacts could not be resolved: com.primeton.eos:eos-pom:pom:8.3.1 (absent): Could not transfer artifact com.primeton.eos:eos-pom:pom:8.3.1 from/to primeton-public-repository (http://ge.primeton.com:31100/repository/primeton_public_repositories/): Connect to ge.primeton.com:31100 [ge.primeton.com/101.230.129.77] failed: Connection refused: connect and 'parent.relativePath' points at wrong local POM @ line 4, column 13 -> [Help 2]

解决方案

熟悉maven的同学可以看出这是maven的settings.xml文件出了问题。

替换 settings.xml文件如下即可:

XML 复制代码
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
	<localRepository>d:/primeton/eos-8.3-dev/repository</localRepository>

	<mirrors>
		<mirror>
			<id>mirror</id>
			<mirrorOf>central,jcenter,!aliyun-rdc-releases,!aliyun-rdc-snapshots
			</mirrorOf>
			<name>mirror</name>
			<url>https://maven.aliyun.com/nexus/content/groups/public</url>
		</mirror>
	</mirrors>
	<profiles>
		<profile>
			<id>primeton</id>
			<repositories>
				<repository>
					<id>central</id>
					<url>https://maven.aliyun.com/nexus/content/groups/public</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
				<repository>
					<id>snapshots</id>
					<url>https://maven.aliyun.com/nexus/content/groups/public</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</repository>
				<repository>
					<id>aliyun-rdc-releases</id>
					<url>https://packages.aliyun.com/maven/repository/2208165-release-FizKV7/
					</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
				<repository>
					<id>aliyun-rdc-snapshots</id>
					<url>https://packages.aliyun.com/maven/repository/2208165-snapshot-deBt2F/
					</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</repository>
				<repository>
					<id>primeton-solution-release</id>
					<url>http://ge.primeton.com:31100/repository/solution-release</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
				<repository>
					<id>primeton-solution-snapshot</id>
					<url>http://ge.primeton.com:31100/repository/solution-snapshot
					</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</repository>
				<repository>
					<id>primeton-solution-public</id>
					<url>http://ge.primeton.com:31100/repository/solution-public</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>central</id>
					<url>https://maven.aliyun.com/nexus/content/groups/public</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
				<pluginRepository>
					<id>snapshots</id>
					<url>https://maven.aliyun.com/nexus/content/groups/public</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</pluginRepository>
				<pluginRepository>
					<id>aliyun-rdc-releases</id>
					<url>https://packages.aliyun.com/maven/repository/2208165-release-FizKV7/
					</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
				<pluginRepository>
					<id>aliyun-rdc-snapshots</id>
					<url>https://packages.aliyun.com/maven/repository/2208165-snapshot-deBt2F/
					</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>
	<activeProfiles>
		<activeProfile>primeton</activeProfile>
	</activeProfiles>
	<servers>
		<server>
			<id>aliyun-rdc-releases</id>
			<username>623db7e13c6b5273a0764cb4</username>
			<password>UP1dH-IITR[I</password>
		</server>
		<server>
			<id>aliyun-rdc-snapshots</id>
			<username>623db7e13c6b5273a0764cb4</username>
			<password>UP1dH-IITR[I</password>
		</server>
	</servers>
</settings>
相关推荐
Kasper01211 小时前
认识Django项目模版文件——Django学习日志(二)
学习·django
xiaocao_10232 小时前
手机备忘录:安全存储与管理个人笔记的理想选择
笔记·安全·智能手机
索然无味io2 小时前
XML外部实体注入--漏洞利用
xml·前端·笔记·学习·web安全·网络安全·php
一弓虽2 小时前
java基础学习——jdbc基础知识详细介绍
java·学习·jdbc·连接池
王磊鑫2 小时前
Java入门笔记(1)
java·开发语言·笔记
安冬的码畜日常3 小时前
【Vim Masterclass 笔记22】S09L40 + L41:同步练习11:Vim 的配置与 vimrc 文件的相关操作(含点评课内容)
笔记·vim·vim配置·vim同步练习·vim options·vim option-list
五味香3 小时前
Java学习,List 元素替换
android·java·开发语言·python·学习·golang·kotlin
追Star仙4 小时前
基于Qt中的QAxObject实现指定表格合并数据进行word表格的合并
开发语言·笔记·qt·word
Clockwiseee4 小时前
docker学习
学习·docker·eureka
安冬的码畜日常5 小时前
【Vim Masterclass 笔记24】S10L43 + L44:同步练习10 —— 基于 Vim 缓冲区的各类基础操作练习(含点评课)
笔记·vim·自学笔记·vim同步练习·vim缓冲区·vim buffer·vim缓冲区练习