部署本地jar到maven私服仓库

settings.xml

<servers>
  <server>  
    <id>thirdparty</id>  
    <username>admin</username>  
    <password>admin</password>  
  </server>
</servers>

<profile>  
      <id>nexus</id>  
      <repositories>  
        <repository>  
            <id>nexus</id>  
            <name>local private nexus</name>  
            <url>http://xxxx:8081/nexus/content/groups/public/</url>  
            <releases><enabled>true</enabled></releases>  
            <snapshots><enabled>false</enabled></snapshots>  
        </repository>  
        <repository>  
            <id>nexus-snapshots</id>  
            <name>local private nexus</name>  
            <url>http://xxxx:8081/nexus/content/groups/public-snapshots/</url>  
            <releases><enabled>false</enabled></releases>  
            <snapshots><enabled>true</enabled></snapshots>  
        </repository>  
      </repositories>  
      <pluginRepositories>  
        <pluginRepository>  
            <id>nexus</id>  
            <name>local private nexus</name>  
            <url>http://xxxx:8081/nexus/content/groups/public/</url>  
            <releases><enabled>true</enabled></releases>  
            <snapshots><enabled>false</enabled></snapshots>  
        </pluginRepository>  
        <pluginRepository>  
            <id>nexus-snapshots</id>  
            <name>local private nexus</name>  
            <url>http://xxxx:8081/nexus/content/groups/public-snapshots/</url>  
            <releases><enabled>false</enabled></releases>  
            <snapshots><enabled>true</enabled></snapshots>  
        </pluginRepository>  
       </pluginRepositories>  
    </profile> 

<activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles> 

deploy

mvn deploy:deploy-file \
-DgroupId=com.xixicat \
-DartifactId=ojdbc14 \
-Dversion=10.2.0.4.0 \
-Dpackaging=jar \
-Dfile=/Users/xixicat/ojdbc14.jar \
-Durl=http://localhost:9090/nexus-2.2-01/content/repositories/thirdparty/ \
-DrepositoryId=thirdparty
    原文作者:codecraft
    原文地址: https://segmentfault.com/a/1190000009267590
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞