PR: MPJDIFF-6

Submitted by: Phil Steitz
Reviewed by:  Brett Porter
Support other SCMs through the SCM plugin (v1.5 required)
Applied with modifications to verify the correct SCM plugin is installed


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@226466 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett 2005-07-30 02:34:25 +00:00
parent 878b5b3dfc
commit f8a47011df
2 changed files with 41 additions and 21 deletions

View File

@ -22,8 +22,22 @@
xmlns:j="jelly:core" xmlns:j="jelly:core"
xmlns:maven="jelly:maven" xmlns:maven="jelly:maven"
xmlns:doc="doc" xmlns:doc="doc"
xmlns:scm="scm"
xmlns:ant="jelly:ant"> xmlns:ant="jelly:ant">
<j:if test="${bootstrapping == null}">
<!-- Poor mans version check - plugin dependencies still suck for multiple versions -->
<maven:get plugin="maven-scm-plugin" property="plugin" var="scmPlugin" />
<j:if test="${scmPlugin.currentVersion.compareTo('1.5') lt 0}">
<ant:fail>
Must have SCM plugin v1.5 installed to use this version of the jdiff plugin.
Try: maven plugin:download -DgroupId=maven -DartifactId=maven-scm-plugin -Dversion=1.5
You can find the latest version of the SCM plugin on the Maven Download page at
http://maven.apache.org/start/download.html
</ant:fail>
</j:if>
</j:if>
<goal name="maven-jdiff-plugin:register"> <goal name="maven-jdiff-plugin:register">
<j:if test="${context.getVariable('maven.mode.online') == null}"> <j:if test="${context.getVariable('maven.mode.online') == null}">
<j:set var="maven.mode.online" value="true" /> <j:set var="maven.mode.online" value="true" />
@ -71,6 +85,9 @@
<ant:equals arg1="${maven.jdiff.old.tag}" arg2="CURRENT"/> <ant:equals arg1="${maven.jdiff.old.tag}" arg2="CURRENT"/>
</ant:condition> </ant:condition>
<j:set var="scmConnection" value="${pom.repository.connection}"/>
<j:set var="scmMethod" value="${scmConnection.substring(4,7)}"/>
<maven:makeRelativePath var="relativeSrcDir" basedir="${basedir}" path="${pom.build.sourceDirectory}" /> <maven:makeRelativePath var="relativeSrcDir" basedir="${basedir}" path="${pom.build.sourceDirectory}" />
<j:choose> <j:choose>
@ -81,16 +98,17 @@
<j:otherwise> <j:otherwise>
<ant:property name="maven.jdiff.new.dir" value="${maven.jdiff.dir}/${maven.jdiff.new.tag}"/> <ant:property name="maven.jdiff.new.dir" value="${maven.jdiff.dir}/${maven.jdiff.new.tag}"/>
<ant:mkdir dir="${maven.jdiff.new.dir}"/> <ant:mkdir dir="${maven.jdiff.new.dir}"/>
<scm:checkout
<ant:cvs var="checkoutBean"
cvsRoot="${pom.repository.cvsRoot}" url="${scmConnection}"
package="${pom.repository.cvsModule}"
dest="${maven.jdiff.new.dir}"
tag="${maven.jdiff.new.tag}" tag="${maven.jdiff.new.tag}"
tagBase="${maven.scm.svn.tagBase}"
workingDirectory="${maven.jdiff.new.dir}"
username="${maven.scm.username}"
password="${maven.scm.password}"
/> />
<ant:property name="maven.jdiff.new.src" <ant:property name="maven.jdiff.new.src"
value="${maven.jdiff.new.dir}/${pom.repository.cvsModule}/${relativeSrcDir}"/> value="${maven.jdiff.new.dir}/${relativeSrcDir}"/>
</j:otherwise> </j:otherwise>
</j:choose> </j:choose>
@ -104,16 +122,17 @@
<ant:property name="maven.jdiff.old.dir" <ant:property name="maven.jdiff.old.dir"
value="${maven.jdiff.dir}/${maven.jdiff.old.tag}"/> value="${maven.jdiff.dir}/${maven.jdiff.old.tag}"/>
<ant:mkdir dir="${maven.jdiff.old.dir}"/> <ant:mkdir dir="${maven.jdiff.old.dir}"/>
<scm:checkout
<ant:cvs var="checkoutBean"
cvsRoot="${pom.repository.cvsRoot}" url="${scmConnection}"
package="${pom.repository.cvsModule}"
dest="${maven.jdiff.old.dir}"
tag="${maven.jdiff.old.tag}" tag="${maven.jdiff.old.tag}"
tagBase="${maven.scm.svn.tagBase}"
workingDirectory="${maven.jdiff.old.dir}"
username="${maven.scm.username}"
password="${maven.scm.password}"
/> />
<ant:property name="maven.jdiff.old.src" <ant:property name="maven.jdiff.old.src"
value="${maven.jdiff.old.dir}/${pom.repository.cvsModule}/${relativeSrcDir}"/> value="${maven.jdiff.old.dir}/${relativeSrcDir}"/>
</j:otherwise> </j:otherwise>
</j:choose> </j:choose>

View File

@ -25,7 +25,8 @@
<author email="evenisse@ifrance.com">Emmanuel Venisse</author> <author email="evenisse@ifrance.com">Emmanuel Venisse</author>
</properties> </properties>
<body> <body>
<release version="1.4.1" date="in CVS"> <release version="1.4.1-SNAPSHOT" date="in CVS">
<action dev="brett" type="update" due-to="Phil Steitz" issue="MPJDIFF-6">Utilise SCM plugin to support multiple SCMs (tested with CVS and Subversion)</action>
<action dev="dion" type="add">Add basic homepage.</action> <action dev="dion" type="add">Add basic homepage.</action>
</release> </release>
<release version="1.4" date="2004-06-18"> <release version="1.4" date="2004-06-18">