brett 2004/02/26 07:08:18
Modified: scm plugin.jelly plugin.properties
scm/xdocs changes.xml
Log:
use developer connection
Revision Changes Path
1.7 +43 -28 maven-plugins/scm/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/scm/plugin.jelly,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- plugin.jelly 25 Feb 2004 22:38:16 -0000 1.6
+++ plugin.jelly 26 Feb 2004 15:08:17 -0000 1.7
@@ -17,36 +17,51 @@
<!-- Goal to validate SCM properties -->
<!--==================================================================-->
<goal name="scm:parse-connection">
- <j:set var="value" value="${maven.scm.ignore.pom.connection}"/>
- <j:if test="${!value}">
- <j:set var="value" value="${pom.repository.connection}"/>
- <j:if test="${!empty(value)}">
- <!-- Use pom.repository.connection if present -->
- <j:set var="delim" value=":"/>
- <j:if test="${value.length() gt 3}">
- <j:set var="delim" value="${value.substring(3, 4)}"/>
+ <j:set var="checkValue" value="${maven.scm.ignore.pom.connection}"/>
+ <j:if test="${!checkValue}">
+ <j:set var="checkValue" value="${maven.scm.ignore.pom.developerConnection}"/>
+ <j:if test="${!checkValue}">
+ <j:set var="value" value="${pom.repository.developerConnection}"/>
+ <j:if test="${!empty(value)}">
+ <echo>Using connection: ${pom.repository.developerConnection}</echo>
+ <j:set var="conn" value="${pom.repository.developerConnection}" />
</j:if>
- <util:tokenize var="tokens"
delim="${delim}">${pom.repository.connection}</util:tokenize>
- <j:if test="${tokens[0] != 'scm'}">
- <ant:fail>Invalid repository connection format</ant:fail>
- </j:if>
- <j:set var="maven.scm.method" value="${tokens[1]}"/>
- <j:set var="scmMethod" value="${maven.scm.method}"/>
- <log:info>Using SCM method: ${scmMethod}</log:info>
- <j:if test="${scmMethod == 'cvs'}">
- <j:choose>
- <j:when test="${tokens[2] == 'local'}">
- <j:set var="maven.scm.cvs.root" value=":${tokens[2]}:${tokens[3]}"/>
- <j:set var="maven.scm.cvs.module" value="${tokens[4]}"/>
- </j:when>
- <j:otherwise>
- <j:set var="maven.scm.cvs.root"
value=":${tokens[2]}:${tokens[3]}:${tokens[4]}"/>
- <j:set var="maven.scm.cvs.module" value="${tokens[5]}"/>
- </j:otherwise>
- </j:choose>
- <log:info>Using CVSROOT: ${maven.scm.cvs.root}</log:info>
- <log:info>Using module: ${maven.scm.cvs.module}</log:info>
+ </j:if>
+
+ <j:if test="${conn == null}">
+ <j:set var="value" value="${pom.repository.connection}"/>
+ <j:if test="${!empty(value)}">
+ <echo>Using connection: ${pom.repository.connection}</echo>
+ <j:set var="conn" value="${pom.repository.connection}" />
</j:if>
+ </j:if>
+ </j:if>
+
+ <j:if test="${conn != null}">
+ <j:set var="delim" value=":"/>
+ <j:if test="${value.length() gt 3}">
+ <j:set var="delim" value="${value.substring(3, 4)}"/>
+ </j:if>
+ <util:tokenize var="tokens" delim="${delim}">${conn}</util:tokenize>
+ <j:if test="${tokens[0] != 'scm'}">
+ <ant:fail>Invalid repository connection format</ant:fail>
+ </j:if>
+ <j:set var="maven.scm.method" value="${tokens[1]}"/>
+ <j:set var="scmMethod" value="${maven.scm.method}"/>
+ <log:info>Using SCM method: ${scmMethod}</log:info>
+ <j:if test="${scmMethod == 'cvs'}">
+ <j:choose>
+ <j:when test="${tokens[2] == 'local'}">
+ <j:set var="maven.scm.cvs.root" value=":${tokens[2]}:${tokens[3]}"/>
+ <j:set var="maven.scm.cvs.module" value="${tokens[4]}"/>
+ </j:when>
+ <j:otherwise>
+ <j:set var="maven.scm.cvs.root"
value=":${tokens[2]}:${tokens[3]}:${tokens[4]}"/>
+ <j:set var="maven.scm.cvs.module" value="${tokens[5]}"/>
+ </j:otherwise>
+ </j:choose>
+ <log:info>Using CVSROOT: ${maven.scm.cvs.root}</log:info>
+ <log:info>Using module: ${maven.scm.cvs.module}</log:info>
</j:if>
</j:if>
</goal>
1.4 +3 -1 maven-plugins/scm/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/maven-plugins/scm/plugin.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- plugin.properties 25 Feb 2004 22:38:16 -0000 1.3
+++ plugin.properties 26 Feb 2004 15:08:18 -0000 1.4
@@ -2,8 +2,10 @@
maven.scm.method=
# Directory to checkout to
maven.scm.checkout.dir=${maven.build.dir}/checkouts
-# Set to true if you want to ignore the connection parameter in the POM
+# Set to true if you want to ignore the connection and developer connection
parameters in the POM
maven.scm.ignore.pom.connection=false
+# Set to true if you want to ignore the developer connection parameter only in the
POM
+maven.scm.ignore.pom.developerConnection=false
# Goals to run on checkout when bootstrapping a project
maven.scm.bootstrap.goals=
1.6 +3 -0 maven-plugins/scm/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/scm/xdocs/changes.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- changes.xml 25 Feb 2004 22:38:16 -0000 1.5
+++ changes.xml 26 Feb 2004 15:08:18 -0000 1.6
@@ -22,6 +22,9 @@
<action dev="brett" type="add">
Update changes.xml version and release date on prepare.
</action>
+ <action dev="brett" type="add">
+ Use developerConnection first, then standard connection when parsing
connection from POM.
+ </action>
</release>
<release version="1.1" date="2003-09-29">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]