maven release插件将一版本发布到仓库中时Return code is: 401, ReasonPhrase:Unauthorized
需要在maven的setting.xml中配置servers.server节点,其值为nexus的对应的repository的id以及用户名及密码
- <servers>
- <server>
- <id>releases</id>
- <username>admin</username>
- <password>admin</password>
- </server>
- <server>
- <id>snapshots</id>
- <username>deployment</username>
- <password>deployment</password>
- </server>
- </servers>
mvn release:prepare -Pxxxx 将用setting.xml中定义的profile为我们提交,打tag,升级pom,再提交的一连串动作(但不要忘了setting.xml的profile定义及pom.xm中定义好maven-release-plugin的tagBase,username,password以及每个模块的scm信息)
maven conf/setting.xml
- <profiles>
- <profile>
- <id>xxxx</id>
- <properties>
- <svn.name>username</svn.name>
- <svn.pwd>password</svn.pwd>
- </properties>
- </profile>
- </profiles>
项目 pom.xml (让子模块都继承自另一个模块,类型为pom,假定名称为parent)
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>xxx.xx.xxx</groupId>
- <artifactId>xxxx</artifactId>
- <version>0.3-SNAPSHOT</version>
- </parent>
- <groupId><u><span style="color:#0066cc;">xxx.xx.xxx</span></u></groupId>
- <artifactId>parent</artifactId>
- <name>parent</name>
- <packaging>pom</packaging>
- <scm>
- <connection>scm:svn:https://192.168.1.88/svn/xxxx/trunk/parent</connection>
- <url>https://192.168.1.88/svn/xxxx/trunk/parent</url>
- </scm>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <configuration>
- <tagBase>https://192.168.1.88/svn/xxxx/tags/</tagBase>
- <username>${svn.name}</username>
- <password>${svn.pwd}</password>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </project>

这样mvn release:perform时maven-release-plugin会自动帮我们签出刚才打的tag,然后打包,分发到远程Maven仓库中(nexus).
注意:如果要把快照版本也发布到存储库,需要在trunk中执行mvn deploy,并且一定要配置snapshotRepository
maven release插件将一版本发布到仓库中时Return code is: 401, ReasonPhrase:Unauthorized的更多相关文章
- Maven-008-Nexus 私服部署发布报错 Failed to deploy artifacts: Failed to transfer file: ... Return code is: 4XX, ReasonPhrase: ... 解决方案
我在部署构件至 maven nexus 私服时,有时会出现 Failed to deploy artifacts: Failed to transfer file: ... Return code i ...
- 到底如何配置 maven 编译插件的 JDK 版本
千言万语不及官方文档,详情请阅读 compiler:compile 文档 配置 maven 编译插件的 JDK 版本 maven 编译插件(maven-compiler-plugin)有默认编译 JD ...
- Maven私有仓库: 发布release版本报错:Return code is: 400, ReasonPhrase: Repository does not allow upd ating assets: maven-releases.
今天在将一个maven组件由SNAPSHORT升级为正式版本1.0.0,然后执行发布: mvn clean deploy -pl ielong-common -am -DskipTests, 报错:R ...
- 解决Maven 报 Return code is: 400 , ReasonPhrase:Repository version policy: SNAPSHOT does not allow version: 2.1.0.RELEASE. 的错误
最近在搭建公司的基础框架,业务需求用到elasticsearch,所以需要整合到基础框架里,供各业务线使用同时也便于管理,但在整合的过程中,出现了莫名的问题,同时maven的提示也不够明确. 我的版本 ...
- 【Maven错误】 Non-resolvable parent POM for ...... Return code is: 500 , ReasonPhrase:Internal Server Error. and 'parent.relativePath' points at no local POM @ line 14, column 11
一.异常信息 [INFO] Scanning for projects... Downloading: http://www.myhost.com/maven/jdk18/org/springfram ...
- maven deploy Return code is: 400, ReasonPhrase: Bad Request.
最近在自己本地deploy jar 到本地 nexus的时候,报错 Return code is: 400, ReasonPhrase: Bad Request. 解决思路: 1.查看maven pr ...
- maven报错:Return code is: 501 , ReasonPhrase:HTTPS Required
今天把一个去年没做完的项目翻出来做时,发现maven无法正常导入依赖.检查了一遍项目配置,没发现有什么问题.而且依赖在本地仓库存在. 随后发现报错:Failed to transfer file:** ...
- JEECG-P3首个开源插件诞生!CMS网站插件 Jeecg-p3-biz-cms1.0版本发布!
Jeecg-P3-Biz-Cms ( JEECG 首个微服务插件,支持小程序的CMS系统) 是基于JEECG-P3 微服务框架开发的CMS建站系统,可轻量级集成进jeecg系统,定制各类网站模板, ...
- 挖一下插件v1.5版本发布
Chrome图片下载插件,支持网页截屏 v.1.5更新说明: 1.增加下载图片按日期分类保存选项,便于管理,用户可根据需要开启/关闭此设置 2.增加网页图片采集快捷键: (1)采集页面图片(Ctrl+ ...
随机推荐
- codeforces 686D D. Kay and Snowflake(dfs)
题目链接: D. Kay and Snowflake time limit per test 3 seconds memory limit per test 256 megabytes input s ...
- 解耦与分离 —— 面向切面编程(AOP)
家里的电表总结起来有两大特性: 电视机需要(电量管理),空调需要(电量管理),热水器也需要电量管理,即一组对象都需要某一功能特性: 电视机根据信号输出画面,空调吹出冷风,热水器将水加热,这些业务功能的 ...
- DP专题之概率DP
注意:在概率DP中求期望要逆着推,求概率要正着推 概率DP求期望: 链接: http://acm.hdu.edu.cn/showproblem.php?pid=4405 dp[ i ]表示从i点走到n ...
- [Codeforces 839C] Journey
[题目链接] http://codeforces.com/contest/839/problem/C [算法] 概率DP 时间复杂度 : O(N) [代码] #include<bits/stdc ...
- 关于Lucene全文检索相关技术
Lucene技术专门解决海量数据下的模糊搜索问题. Lucene主要完成的是数据预处理.建立倒排索引,及搜索.排名.高亮显示等功能 全文检索相关词语概要: 单词和文档矩阵: 文档(Document): ...
- notepad++无法设置成默认打开方式
安装软件自动保存到默认的目录下(c盘下)
- iOS Debug心得 (持续更新)
最近在维护一个内部比较混乱的APP,Debug的时候遇到很多比较痛苦的地方, 因此做一个Debug记录,对以后的开发会有比较大的帮助: 这样,在开发新项目的时候就可以争取把一些BUG扼杀在襁褓中. & ...
- CF1140G Double Tree
题解 首先如果我们要确定出每个\(dis_{i \to i+1 , i \in odd}\) 这个可以用两遍树形\(DP\)来解决 一遍是考虑走子树子树绕过来的 一遍是考虑从走祖先绕过来的 然后就可以 ...
- [poj2096] Collecting Bugs【概率dp 数学期望】
传送门:http://poj.org/problem?id=2096 题面很长,大意就是说,有n种bug,s种系统,每一个bug只能属于n中bug中的一种,也只能属于s种系统中的一种.一天能找一个bu ...
- [ZPG TEST 110] 多边形个数【DP】
1. 多边形个数 (polygons.pas/c/cpp) [问题描述] 给定N线段,编号1到n.并给出这些线段的长度,用这些线段组成一个K边形,并且每个线段做多使用一次.若使用了一条不同编号的线段, ...