maven 远程仓库配置好复杂啊,快疯了。

2016-08-13 17:38:49 +08:00
 eightqueen

问题背景: settings.xml 配置的镜像是公司私服,做私人项目的时候,我不想用公司私服,改用阿里云,于是在 pom.xml 里配置,但是不起作用。

setting.xml:

<mirror>
	<id>mirror-shandiangou</id>
	<mirrorOf>central</mirrorOf>
	<name>shandiangou</name>
	<url>http://mvnrepository.xxx.com/nexus/content/groups/public/</url>
</mirror>

pom.xml :

<repositories>
    <repository>
        <id>aliyun</id>
        <name>Nexus Repository</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
        <releases>
        <enabled>true</enabled>
        </releases>
        <snapshots><enabled>true</enabled></snapshots>
    </repository>
</repositories>
4541 次点击
所在节点    Java
6 条回复
acrisliu
2016-08-13 18:42:59 +08:00
项目里面的 pom.xml ,仓库 ID 改成 central 。
acrisliu
2016-08-13 18:43:38 +08:00
gradle 相对来说简单多了,所以我现在都迁移到 gradle 了。
Lonely
2016-08-13 18:44:30 +08:00
人生苦短,我用 gradle
twtiyb
2016-08-13 20:27:52 +08:00
用 idea ...maven 可以選擇 profile
tabris17
2016-08-13 20:29:26 +08:00
脱 maven 保平安
tangsl
2017-09-22 20:11:00 +08:00
@acrisliu gradle 还是从 maven 仓库拉依赖包?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/299089

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX