阿里云Maven配置,Maven仓库配置,Maven镜像配置
阿里云Maven配置,Maven仓库配置,Maven镜像配置
========================
蕃薯耀 2018年1月29日
http://www.cnblogs.com/fanshuyao/
一、setting.xml文件配置镜像
找到mirrors镜像节点,增加mirror节点,如下所示:
- <mirrors>
- <!-- mirror
- | Specifies a repository mirror site to use instead of a given repository. The repository that
- | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
- | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
- |
- <mirror>
- <id>mirrorId</id>
- <mirrorOf>repositoryId</mirrorOf>
- <name>Human Readable Name for this Mirror.</name>
- <url>http://my.repository.com/repo/path</url>
- </mirror>
- -->
- <mirror>
- <id>alimaven</id>
- <mirrorOf>central</mirrorOf>
- <name>aliyun maven</name>
- <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
- </mirror>
- </mirrors>
二、本地Jar包仓库配置
在setting.xml文件中找点localRepository节点,具体配置如下:
路径自己定义
- <!-- localRepository
- | The path to the local repository maven will use to store artifacts.
- |
- | Default: ${user.home}/.m2/repository
- <localRepository>/path/to/local/repo</localRepository>
- -->
- <localRepository>D:\0soft\repository</localRepository>
三、pom.xml文件仓库配置
- <repositories>
- <repository>
- <id>alimaven</id>
- <name>aliyun maven</name>
- <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
- </repository>
- </repositories>
========================
蕃薯耀 2018年1月29日
http://www.cnblogs.com/fanshuyao/
今天越懒,明天要做的事越多。