Maven 版本管理

1.account-web进行版本管理,在POM.xml中增加

<scm>
    <connection>scm:svn:https://localhost/svn/account/trunk/account/account-web</connection>
    <developerConnection>scm:svn:https://localhost/svn/account/trunk/account/account-web</developerConnection>
    <url>https://localhost/svn/account/trunk/account/account-web</url>
  </scm>

 2.增加插件

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-release-plugin</artifactId>
	<version>2.0</version>
	<configuration>
		<tagBase>https://localhost/svn/account/tags/</tagBase>
	</configuration>
</plugin>

 

3.POM.xml文件内容:

<?xml version="1.0"?>
<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>com.iteye.xujava</groupId>
		<artifactId>account</artifactId>
		<version>1.0.0</version>
	</parent>
	<artifactId>account-web</artifactId>
	<name>Account Web</name>
	<version>1.0.1-SNAPSHOT</version>
	<packaging>war</packaging>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>account-service</artifactId>
			<version>1.0.0</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.4</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
		</dependency>
	</dependencies>
	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.mortbay.jetty</groupId>
					<artifactId>jetty-maven-plugin</artifactId>
					<version>7.1.0.RC1</version>
					<configuration>
						<scanIntervalSeconds>10</scanIntervalSeconds>
						<webAppConfig>
							<contextPath>/account</contextPath>
						</webAppConfig>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.0</version>
					<configuration>
						<tagBase>https://localhost/svn/account/tags/</tagBase>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

  <scm>
    <connection>scm:svn:https://localhost/svn/account/trunk/account/account-web</connection>
    <developerConnection>scm:svn:https://localhost/svn/account/trunk/account/account-web</developerConnection>
    <url>https://localhost/svn/account/trunk/account/account-web</url>
  </scm>
</project>

 4.运行mvn release:prepare

 5.运行mvn release:perferm

 6.注意:依赖的包不能有SNAPSHOT版本,要发布的包的版本必须有-SNAPSHOT

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值