mvn release plugin插件使用

昨天,根据领导的要求,需要对部门的产品进行新版本的发布,问了之前的人,需要做的就是在改pom文件为新版本号,提交git代码,在git中建基线,再次修改版本号,再次提交git。

同时给了之前打基线的一个文档,其中提到的是使用maven的release插件自动执行。中间折腾了好久,又是maven的用户名密码不对,导致没有权限,亦或者是我本机安装的git提交有问题。总之折腾了好久,早上在同事的帮助下,终于成功了,记录下来。

pom文件中配置builg的地址

<description>bbb 3rd project management</description>
	<scm>
		<connection>scm:git:ssh://git@x.x.x.x/aaa/bbb</connection>
		<url>scm:git:ssh://git@x.x.x.x/aaa/bbb</url>
		<developerConnection>scm:git:ssh://git@x.x.x.x/aaa/bbb</developerConnection>
		<tag>HEAD</tag>	
	</scm>
	<build>

		<plugins>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.4.2</version>
				<configuration>
					<tagNameFormat>v@{project.version}</tagNameFormat>
				</configuration>
			</plugin>
		</plugins>
	</build>

maven的setting.xml文件中设置release和snapshot的服务器信息。其中,用户名、密码、id和url需要根据真实的值进行配置:

 <server>
      <id>repository-snapshots</id>
      <username>deployment1111</username>
      <password>deployment1111</password>
 </server>

 <server>
      <id>repository-releases</id>
      <username>deployment1111</username>
      <password>deployment1111</password>
 </server>

<profile>      
          <id>repository-releases</id>
 <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>repository-snapshots</id>
          <name>Repository for SNOPSHOT</name>
          <url>http://XX.XX.XX.XX:8081/nexus/content/repositories/repository-snapshots/</url>
		  <releases>
			<enabled>true</enabled>
		  </releases>
		  <snapshots>
			<enabled>false</enabled>
		  </snapshots>
        </repository>
      </repositories>
    </profile>

  <profile>
      <id>repository-snapshots</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>repository-snapshots</id>
          <name>Repository for SNOPSHOT</name>
          <url>http://XX.XX.XX.XX:8081/nexus/content/repositories/repository-snapshots/</url>
		  <releases>
			<enabled>false</enabled>
		  </releases>
		  <snapshots>
			<enabled>true</enabled>
		  </snapshots>
        </repository>
      </repositories>
    </profile>

确保代码已提交到git,且与git保持一致后,在git命令行(或者以管理员身份启动windows自带的cmd)输入:

mvn release:prepare

经过一系列版本号及新版本号的确认,之后就是一长串的日志输出信息,主要工作为改pom文件、提交git、打标签、build、提交maven仓库、改pom文件等等的输出信息。(理论上是这些内容)。可以确认一下git上的标签是否打成功,pom文件是否提交成功,pom文件是否改为新的snapshot的值。

再次将更改后的新的快照pom文件提交git。

执行下面代码,删除release的过程文件,会再次打包,上传maven。

mvn release:perform -Darguments="-Dmaven.javadoc.skip=true"

执行后,我的maven仓库没有打包发布release和新版本的快照文件,用的是部门的jenksin工具,让它打包发布到maven仓库的。成功。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
NOTE:the directory like the fllow: ollydbg(32bit): ...\od\Plugin\xx_vm32.dll ...\od\Plugin\xx_vm_iat32.dll ...\od\xxdisasm32.dll ...\od\xx_comm32.dll ...\od\xx_opmz32.dll ...\od\xx_exp.x ...\od\xx_vm.chm x64dbg(64bit): ...\snapshot_????_??_??_??_??\release\x64\plugins\xx_vm.dp64 ...\snapshot_????_??_??_??_??\release\x64\plugins\xx_vm_iat64.dp64 ...\snapshot_????_??_??_??_??\release\x64\xxdisasm64.dll ...\snapshot_????_??_??_??_??\release\x64\xx_comm64.dll ...\snapshot_????_??_??_??_??\release\x64\xx_opmz64.dll ...\snapshot_????_??_??_??_??\release\x64\xx_exp.x ...\snapshot_????_??_??_??_??\release\x64\xx_vm.chm ///////////////////////////////////////////////////////////////////////////////////////////// version: 1.3.4 1.(xx_vm32)repairs the error of single-step bullet window after dynamic analysis in normal analysis rules 2.(xx_vm32/64)Fixed the error that the log shows two "vm_entry" in the circular analysis rule, 3.(xx_vm32/64)Fixed the error that 'xx_vm' enters 'running state' when authorization expires 4.Rewrite validation code, Fully compatible with xp, win7, win10 systems 5.(xx_vm_iat32)Repair errors caused by recognition 版本: 1.3.4 1:(xx_vm32)在正常分析规则中,动态分析结束后,修复单步弹窗的错误 2:(xx_vm32/64)修复,循环分析规则中,日志显示2个vm_entry的错误 3:(xx_vm32/64)修复,授权过期时,xx_vm进入running状态的错误 4:重写验证代码,完全兼容xp,win7,win10系统 5:(xx_vm_iat32)修复由于识别引起的错误 ///////////////////////////////////////////////////////////////////////////////////////////// 备注: win7(32位),无法正常激活的,可使用license验证
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值