找回密码
 立即注册
搜索
热搜: Java Linux Docker
查看: 35|回复: 0

[Java] pom.xml 配置中央仓库 (Maven)

[复制链接]

24

主题

1

回帖

4万

积分

管理员

积分
40166
发表于 2024-9-6 18:40:56 | 显示全部楼层 |阅读模式
在项目结构中的pom.xml 配置文件中加入如下配置信息:
  1. <repositories>
  2.     <repository>
  3.       <id>central</id>
  4.       <name>Central Repository</name>
  5.       <url>https://repo.maven.apache.org/maven2</url>
  6.       <layout>default</layout>
  7.       <snapshots>
  8.         <enabled>false</enabled>
  9.       </snapshots>
  10.     </repository>
  11.     <repository>
  12.         <id>nexus-aliyun</id>
  13.         <name>nexus-aliyun</name>
  14.         <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  15.         <releases>
  16.             <enabled>true</enabled>
  17.         </releases>
  18.         <snapshots>
  19.             <enabled>false</enabled>
  20.         </snapshots>
  21.     </repository>
  22.   </repositories>
  23.   <pluginRepositories>
  24.     <pluginRepository>
  25.         <id>public</id>
  26.         <name>aliyun nexus</name>
  27.         <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  28.         <releases>
  29.             <enabled>true</enabled>
  30.         </releases>
  31.         <snapshots>
  32.             <enabled>false</enabled>
  33.         </snapshots>
  34.     </pluginRepository>
  35. </pluginRepositories>
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|saotolls Inc.

GMT+8, 2025-11-8 18:18 , Processed in 0.180260 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表