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. 括号序和dfs序

    记得清北讲过括号序和dfs序,忘记了 dfs序 dfs序就是dfs的顺序,这个好记 就是在dfs遍历树的时候,将每个结点开始时记录一次,结束时记录一次 而且一个子树可以表示为连续的一段, 只有子树操作 ...

  2. Jenkins+Ant/maven+Svn实现自动化部署,编译,运行,测试结果自动邮件通知

    Jenkins+Ant+Svn实现自动化部署,编译,运行,测试结果自动邮件通知

  3. 使Apache支持PHP

    1.用记事本打开Apache安装目录下conf文件夹中的httpd.conf文件,找到LoadModule部分的配置代码,在该部分添加下面的代码,将PHP模块加载到Apache服务中,使得Apache ...

  4. 强大的Manage

    Queue和Pipe实现的数据共享方式只支持两种结构 Value 和 Array.Python中提供了强大的Manage专门用来做数据共享,其支持的类型非常多,包括: Value,Array,list ...

  5. shell 字符串运算符

    字符串运算符 下表列出了常用的字符串运算符,假定变量 a 为 "abc",变量 b 为 "efg": 运算符 说明 举例 = 检测两个字符串是否相等,相等返回 ...

  6. 适用于目前环境的bug记录

    问测试,bugtracker.JIRA,你们用起来啊? 难道bugtracker/JIRA只有测试用吗? 截屏忽略,只有测试人员自己提bug,开发不管不顾,解决了也不关闭bug,bug提得太多,还嫌测 ...

  7. MSVC_代码优化

    测试环境: Win7x64 cn_visual_studio_2010_ultimate_x86_dvd_532347.iso qt-opensource-windows-x86-msvc2010_o ...

  8. [osg]osg自定义事件的理解

    参考:http://blog.csdn.net/l_andy/article/details/51058907 添加自定义事件 首先osg在其内部通过osgGA::EventQueue类维护了一个事件 ...

  9. RabbitMQ入门_14_Policies

    参考资料:https://www.rabbitmq.com/parameters.html#policies A. Policies 的用途 RabbitMQ 有很多可选参数(x-arguments) ...

  10. threejs和particles.js

    particles.js 在线配置的东西: http://vincentgarreau.com/particles.js/ https://threejs.org/ http://thehuub.co ...