maven install deploy
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的更多相关文章
- maven install deploy tell us heap is full
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compi ...
- maven package install deploy
1.maven package:打包到本项目,一般是在项目target目录下. 如果a项目依赖于b项目,打包b项目时,只会打包到b项目下target下,编译a项目时就会报错,因为找不到所依赖的b项目, ...
- maven 在执行package,install,deploy时使用clean与不使用clean的区别
有时候用mvn install后,新改的内容不生效,一定要后来使用mvn clean install 才生效,由于之前没有做记录,以及记不清是什么情况下才会出现的问题,于是想看看clean和不clea ...
- eclipse maven build、maven clean、maven install和maven test的区别 精析
1.情景展示 选中maven项目,右键-->Run As或Debug As-->maven buid,maven install,maven test有什么区别? 2.区别说明 ...
- maven install时报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
首先检查父项目,子项目的jdk版本是否一致,编码格式是否一致我的问题就错在了编码格式上,父项目用的是UTF-8,子项目新建的,默认GBK这时,使用maven install命令出错 提示:[INFO] ...
- maven install 构建报错(2)
错误:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3 . 2 :compile ( default ...
- springboot maven install 找不到符号
好多朋友在网上找maven install 找不到符号,我今天也遇到了同样的问题,我项目结构如下: 在multicreate-web这个项目引用了multicreate-service的jar包,在i ...
- eclipse中maven install和build,clean
eclipse插件,m2eclipse 1.maven install相当于maven原生的命令: mvn install 2.aven build是 m2eclipse这个插件自己创造的概念,需要你 ...
- 今天maven install时碰到的两个问题(堆溢出和编译错误)
问题1.maven install时出现,日志如下: 系统资源不足.有关详细信息,请参阅以下堆栈追踪. java.lang.OutOfMemoryError: Java heap space at c ...
随机推荐
- linux下如何使用命令行配置网络
答:一共分成以下几个步骤: 注:笔者使用的是ubuntu 1.设置ip sudo ifconfig eth0 192.168.1.121 2.设置网关 sudo route add default g ...
- linux下使用grep在当前目录下搜索所有文件中含有的字符串
grep -r yourstr ./ 举例: grep -r sprintf ./ (在当前目录下递归查找含有字符串sprintf的文件)
- Trailing Zeroes (III) (二分)题解
You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in d ...
- 用 C# 计算 与 java 一致的unix时间戳 (长时间整形 如:1476956079961)
背景: 调用java提供接口,需要长时间整形作为验证. 预备知识: 1. java 的 System.currentTimeMillis() 计算的长整型,是从1970年1月1日开始,截止当前的毫秒数 ...
- UVa 1610 聚会游戏
https://vjudge.net/problem/UVA-1610 题意:输入一个n个字符串的集合D,找一个长度最短的字符串S,使得D中恰好有一半串小于等于S,另一半串大于S. 思路:先拍序,然后 ...
- mysql 存储过程简单实例
一.什么是存储过程 存储过程(Stored Procedure)是在大型数据库系统中,一组为了完成特定功能的SQL 语句集,存储在数据库中,经过第一次编译后再次调用不需要再次编译,用户通过指定存储过程 ...
- 电脑上装两个JDK的方法
在window操作系统上配置两个JDK方便开发以及新JDK的学习 我的机子上的JDk环境为1.8 在cmd中执行:java -version 查看JDK版本 安装方法 在系统变量中配置中设置JAVA_ ...
- password_hash加密
每次执行 password_hash('123456', PASSWORD_BCRYPT) 语句后,得到哈希值都不一样! 给密码做哈希之前,会先加入一个随机子串,因为加入的随机子串每次是不一样的,所以 ...
- Chrome开发者工具之JavaScript内存分析(转)
尽管JavaScript使用垃圾回收进行自动内存管理,但有效的(effective)内存管理依然很重要.在这篇文章中我们将探讨分析JavaScript web应用中的内存问题.在学习有关特性时请确保尝 ...
- 使用CMake在Linux下编译tinyxml静态库
环境:CentOS6.6+tinyxml_2_6_21.下载并解压tinyxml_2_6_2.zip unzip tinyxml_2_6_2.zip 2.在tinyxml文件夹里创建一个CMakeLi ...