zoukankan      html  css  js  c++  java
  • maven安装 maven上传jar包到库里面

    maven的安装与配置:http://pansanday.blog.163.com/blog/static/381662802012727103454743/

    maven上传jar包到库里面:

    将私有的jar包或者maven(http://maven.apache.org)找不到匹配的jar包,导入到本地库中:

    mvn install:install-file -Dfile=d:/Downloads/apache-activemq-5.5.0/lib/activemq-core-5.5.0.jar -DgroupId=org.apache.activemq -DartifactId=activemq-core -Dversion=5.5.0 -Dpackaging=jar

    解析:

    mvn install:install-file  -Dfile=外部包的路径

                     -DgroupId=外部包的groupId  

                     -DartifactId=外部包的artifactId 

                     -Dversion=外部包的版本号  

                     -Dpackaging=jar

    记住这是本地库!!!

    下面是上传到远程库中:

    pom.xml中加上:

    <distributionManagement>
    		<snapshotRepository>
    			<id>nexus-snapshots</id>
    			<name>Snapshots</name>
    			<url>**********************************</url>
    		</snapshotRepository>
    		<repository>
    			<id>nexus-release</id>
    			<name>Releases</name>
    			<url>**********************************</url>
    		</repository>
    	</distributionManagement>
    

     maven安装目录下的settings.xml中的servers加上:

    <server>
        	<id>nexus-release</id>
        	<username>***********</username>
        	<password**********</password>
        </server>
        <server>
        	<id>nexus-snapshots</id>
        	<username>**********</username>
        	<password>*********</password>
        </server>
    

     然后右击运行项目,输入clean  deploy

    OK!

  • 相关阅读:
    #leetcode刷题之路32-最长有效括号
    #leetcode刷题之路31-下一个排列
    数据结构第一节 递归
    数据结构 第一节
    java基础 抽象类与接口
    Spring1
    java基础3。定义类
    java基础2。基本数据类型
    java基础1。面向对象
    丑数
  • 原文地址:https://www.cnblogs.com/I-will-be-different/p/3893951.html
Copyright © 2011-2022 走看看