Spark example 源码通过idea打开,一直build 问题解决

问题描述:
本机配置了maven环境变量,maven对应的setting.xml的mirrors配置了阿里云的仓库:

   <mirror>
            <id>alimaven</id>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>

但是很久都无法build结束;且通过idea或者maven install 看下载依赖的地址是:

https://maven-central.storage-download.googleapis.com/maven2

此地址可以ping通,但下载一直很慢

于是采用修改pom.xml的方式更新仓库。在example项目的pom.xml文件中新增:

<!--配置maven阿里云仓库开始,不用去改maven的setting -->
<repositories>
	<repository>
		<id>public</id>
		<name>local private nexus</name>
		<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
		<releases>
			<enabled>true</enabled>
		</releases>
	</repository>
</repositories>
<pluginRepositories>
	<pluginRepository>
		<id>public</id>
		<name>local private nexus</name>
		<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
		<releases>
			<enabled>true</enabled>
		</releases>
		<snapshots>
			<enabled>false</enabled>
		</snapshots>
	</pluginRepository>
</pluginRepositories>
<!--配置maven阿里云结束 -->

此时通过maven install 可以看到下载位置更新成了阿里云的地址;下载速度加快了,但还是很久下载不完,于是又找到方法:
修改spark源码下pom.xml中的配置
把对应的 repositories 和 pluginRepositories 都改成上面的从阿里云下载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值