zoukankan      html  css  js  c++  java
  • maven install deploy

    1.安装到本地仓库

    install jar to local fs

    mvn install:install-file -Dfile=/home/hotspot/autoBuild/project/licenseVerify-0.0.1.jar -DgroupId=com.bonc -DartifactId=licenseVerify-0.0.1.jar -Dversion=0.0.1 -Dpackaging=jar

     2.部署到远程私有仓库

    在项目的pom.xml配置如下

    <distributionManagement>
        <repository>
            <id>deploymentMetaApp</id>
            <url>http://233xyx.com:9001/repository/maven-snapshots/</url>
        </repository>
    </distributionManagement>

    然后执行命令

    mvn deploy:deploy-file -DgroupId=com.gexin.platform -DartifactId=gexin-rp-fastjson -Dversion=1.0.1 -Dpackaging=jar 
    -Dfile=gexin-rp-fastjson-1.0.1.jar 
    -Durl=http://233xyx.com:9001/repository/maven-snapshots/ -DrepositoryId=deploymentMetaApp
    -DrepositoryId=deploymentMetaApp 是 pom.xml中指定的repository的id,与settings.xml中的servers>server>id 相对应。

    需要在本机maven/conf/setting.xml配置如下

    <servers>
    	<server>
    		<id>deploymentMetaApp</id>
    		<username>admin</username>
    		<password>Manager.123</password>
    	</server>
    </servers>
    <mirrors>
    	<mirror>
    		<id>nexus-aliyun</id>
    		<mirrorOf>*</mirrorOf>
    		<name>Nexus aliyun</name>
    		<url>http://maven.aliyun.com/nexus/content/groups/public</url>
    	</mirror>
    </mirrors>
    
    <profile>     
    	<!--profile的id-->  
    	<id>dev</id>     
    	<repositories>     
    	<repository>    
    		<!--仓库id,repositories可以配置多个仓库,保证id不重复-->  
    		<id>deploymentMetaApp</id>     
    		<!--仓库地址,即nexus仓库组的地址-->  
    		<url>http://233xyx.com:9001/repository/maven-snapshots/</url>     
    		<!--是否下载releases构件-->  
    		<releases>
    			<enabled>true</enabled>     
    		</releases>     
    		<!--是否下载snapshots构件-->  
    		<snapshots>     
    			<enabled>true</enabled>     
    		</snapshots>     
    	</repository>     
    	</repositories>    
    	<pluginRepositories>    
    		<!-- 插件仓库,maven的运行依赖插件,也需要从私服下载插件 -->  
    		<pluginRepository>    
    			<!-- 插件仓库的id不允许重复,如果重复后边配置会覆盖前边 -->  
    			<id>deploymentMetaApp</id>    
    			<name>Public Repositories</name>    
    			<url>http://233xyx.com:9001/repository/maven-public/</url>    
    		</pluginRepository>
    	</pluginRepositories>
    </profile>  
    <activeProfiles>
    	<activeProfile>dev</activeProfile>
    </activeProfiles>
    

      

  • 相关阅读:
    文件的上传
    扩展HTTP管道
    发布开源框架iOS矢量图形框架 TouchVG
    批量修改文件名的py脚本
    《矢量绘图基础》PPT
    开题了《面向移动设备的交互式图形平台设计与实现》
    计算几何(转)
    批量替换文件名和内容的Python脚本
    iOS上的二维绘图软件现状
    基本图形手绘图形算法包
  • 原文地址:https://www.cnblogs.com/zhengwenqiang/p/7240050.html
Copyright © 2011-2022 走看看