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

被折叠的 条评论
为什么被折叠?



