Import jar package into local warehouse && configure Ali warehouse

Import jar package into local warehouse && configure Ali warehouse

Note: The premise must be that the local maven has been successfully configured

  1. Import the jar package into the local warehouse

Take the spring-jdbc-template-0.2.1.jar package as an example, its path in this machine is: D:\java\spring-jdbc-template-0.2.1.jar

1.  在cmd窗口中首先将路径跳转到D:\java:
2.  执行:mvn install:install-file -DgroupId=cn.danielw -DartifactId=spring-jdbc-template -Dversion=0.2.1 -Dpackaging=jar -Dfile=spring-jdbc-template-0.2.1.jar
即:指定
-DgroupId=cn.danielw
-DartifactId=spring-jdbc-template
-Dversion=0.2.1
-Dpackaging=jar -Dfile=spring-jdbc-template-0.2.1.jar
  1. Configure Alibaba Cloud Central Warehouse (type in the maven settings.xml configuration file:)
    <mirror>
        <id>nexus-aliyun</id>       
        <mirrorOf>*</mirrorOf>       
        <name>Nexus aliyun</name>       
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>    
     </mirror>

Guess you like

Origin blog.51cto.com/14982816/2602790