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. Android内核和Linux内核的区别

    1.Android系统层面的底层是Linux,并且在中间加上了一个叫做Dalvik的Java虚拟机,从表面层看是Android运行库.每个Android应用都运行在自己的进程上,享有Dalvik虚拟机 ...

  2. P1471 方差

    题目 luogu 思路 \[\frac{1}{n}*\sum_{1}^{n}( a_{i}-A)^{2}\] \[\frac{1}{n}*\sum_{1}^{n}( a_{i}^2-2*A*a_{i} ...

  3. Codeforces 1091 Good Bye 2018

    占个坑先,希望不要掉的太惨了吧,不要掉到上一次之前的rating upt:flag竟然没到,开心. A - New Year and the Christmas Ornament 好像没什么可说的. ...

  4. maven插件安装

    eclipse安装maven插件,在网上有各种各样的方法,博主使用过的也不止一种,但是留下的印象总是时好时不好,同样的方法也不确定那一次能够成功.其实失败的大多数原因是因为所安装的maven插件版本与 ...

  5. Win10重命名文件夹导致资源管理器卡顿的解决办法

    我本机使用的是 Win10 1607,不清楚是因为什么原因导致重命名文件夹时资源管理器会被卡死,找了很长时间终于找到了解决办法,现在我把步骤粘出来以便后续遇到相同问题的朋友能及时解决. 其实操作很简单 ...

  6. TDD、BDD、DDD

    TDDTest-Driven DevelopmentTest-Driven Development (TDD) is a software development technique where au ...

  7. Mysql tinyint长度为1时在java中被转化成boolean型

    MySql 中的tinyint(1)的使用 在MySql中如何定义像Java中类型的Boolean类型数据..其实,mysql中 是没有直接定义成Boolean这种数据类型. 它只能定义成 tinyi ...

  8. Qt_QString::split测试

    1. #define GID_PREFIX "dr_" QString str = "dr__awedr4"; QString str1; QStringLis ...

  9. 字符集(编码)转换_Windows

    ZC: 来自 我的项目 czgj ZC: (1).经过测试 MultiByteToWideChar(...) 返回的是 (需要的)WideChar[宽字符]的个数:(2).WideCharToMult ...

  10. [设计模式][c++]状态切换模式

    转自:http://blog.csdn.net/yongh701/article/details/49154439 状态模式也是设计模式的一种,这种设计模式思想不复杂,就是实现起来的代码有点复杂.主要 ...