1.安装到本地仓库

install jar to local fs

mvn install:install-file -Dfile=/home/hotspot/autoBuild/project/licenseVerify-0.0..jar -DgroupId=com.bonc -DartifactId=licenseVerify-0.0..jar -Dversion=0.0. -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. -Dpackaging=jar \
-Dfile=gexin-rp-fastjson-1.0..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>

  

maven install deploy的更多相关文章

  1. maven install deploy tell us heap is full

    <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compi ...

  2. maven package install deploy

    1.maven package:打包到本项目,一般是在项目target目录下. 如果a项目依赖于b项目,打包b项目时,只会打包到b项目下target下,编译a项目时就会报错,因为找不到所依赖的b项目, ...

  3. maven 在执行package,install,deploy时使用clean与不使用clean的区别

    有时候用mvn install后,新改的内容不生效,一定要后来使用mvn clean install 才生效,由于之前没有做记录,以及记不清是什么情况下才会出现的问题,于是想看看clean和不clea ...

  4. eclipse maven build、maven clean、maven install和maven test的区别 精析

          1.情景展示 选中maven项目,右键-->Run As或Debug As-->maven buid,maven install,maven test有什么区别? 2.区别说明 ...

  5. maven install时报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile

    首先检查父项目,子项目的jdk版本是否一致,编码格式是否一致我的问题就错在了编码格式上,父项目用的是UTF-8,子项目新建的,默认GBK这时,使用maven install命令出错 提示:[INFO] ...

  6. maven install 构建报错(2)

    错误:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3 . 2 :compile ( default ...

  7. springboot maven install 找不到符号

    好多朋友在网上找maven install 找不到符号,我今天也遇到了同样的问题,我项目结构如下: 在multicreate-web这个项目引用了multicreate-service的jar包,在i ...

  8. eclipse中maven install和build,clean

    eclipse插件,m2eclipse 1.maven install相当于maven原生的命令: mvn install 2.aven build是 m2eclipse这个插件自己创造的概念,需要你 ...

  9. 今天maven install时碰到的两个问题(堆溢出和编译错误)

    问题1.maven install时出现,日志如下: 系统资源不足.有关详细信息,请参阅以下堆栈追踪. java.lang.OutOfMemoryError: Java heap space at c ...

随机推荐

  1. json字符窜转对象

    第一种方法: 注意引用:using System.Runtime.Serialization.Json; using System.IO; static void Main(string[] args ...

  2. CenterOS下从零起步简单部署RockMongo

    使用Mongodb,对于调试Query,查看Collection等状态,有Rockmongo是非常方便的. 研究了下Rockmongo的部署,主要是依赖PHP环境的web服务器,当前有两种服务器,一种 ...

  3. HDU 1686 Oulippo

    http://acm.hdu.edu.cn/showproblem.php?pid=1686 题意:给定一个文本串和给定一个模式串,求文本串中有几个模式串. 思路:直接套用KMP模板. #includ ...

  4. WCF 统一处理异常利用行为服务扩展

    https://www.cnblogs.com/niaowo/p/4727378.html using System; using System.Collections.Generic; using ...

  5. phpMyAdmin-Error:The mbstring extension is missing. Please check your PHP configuration.

    1.打开php.ini 2.找到 ; extension_dir = "./",把前面的分号去掉.引号里改成extension_dir = "D:php/ext" ...

  6. UOJ #103:【APIO2014】Palindromes

    题意: 考虑一个只包含小写拉丁字母的字符串s.我们定义s的一个子串t的“出 现值”为t在s中的出现次数乘以t的长度.请你求出s的所有回文子串中的最 大出现值. 学会马拉车之后发现还需要后缀数组才能AC ...

  7. codeforces 351 div2 C. Bear and Colors 暴力

    C. Bear and Colors time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  8. Springboot 学习笔记 之 Day 4 笔记部分

    spring-boot-starter 核心Spring Boot starter,包括自动配置支持,日志和YAMLspring-boot-starter-actuator 生产准备的特性,用于帮你监 ...

  9. MVC修改视图的默认路径

    概述:之前MVC5和之前的版本中,我们要想对View文件的路径进行控制的话,则必须要对IViewEngine接口的FindPartialView或FindView方法进行重写,所有的视图引擎都继承于该 ...

  10. 《剑指offer》第十一题(旋转数组的最小数字)

    // 面试题:旋转数组的最小数字 // 题目:把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转. // 输入一个递增排序的数组的一个旋转,输出旋转数组的最小元素.例如数组 // {3, ...