use developer connection
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114749 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
89c1465002
commit
beaa473499
@ -17,38 +17,53 @@
|
||||
<!-- 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>
|
||||
|
||||
<goal name="scm:validate" prereqs="scm:parse-connection">
|
||||
|
||||
@ -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=
|
||||
|
||||
@ -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">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user