Alibaba Cloud Maven configuration, Maven warehouse configuration, Maven image configuration

Alibaba Cloud Maven configuration, Maven warehouse configuration, Maven image configuration

 

========================

Sweet Potato Yao2018-01-23

http://fanshuyao.iteye.com/

 

1. The setting.xml file configures the mirror

Find the mirrors mirror node and add mirror nodes as follows:

<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>

 

 

Second, the local Jar package warehouse configuration

Find the localRepository node in the setting.xml file, and the specific configuration is as follows:

Define your own path

  <!-- 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>

 

 

 

Three, pom.xml file warehouse configuration

 

<repositories>  
	    <repository>  
	        <id>alimaven</id>  
	        <name>aliyun maven</name>  
	        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
	    </repository>
	</repositories>

 

 

 

========================

Sweet Potato Yao2018-01-23

http://fanshuyao.iteye.com/

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326305484&siteId=291194637