Author: brett Date: Tue May 31 21:08:14 2005 New Revision: 179349 URL: http://svn.apache.org/viewcvs?rev=179349&view=rev Log: remove deprecated legacy deploy method
Modified: maven/maven-1/plugins/trunk/artifact/plugin.jelly maven/maven-1/plugins/trunk/artifact/xdocs/changes.xml Modified: maven/maven-1/plugins/trunk/artifact/plugin.jelly URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/artifact/plugin.jelly?rev=179349&r1=179348&r2=179349&view=diff ============================================================================== --- maven/maven-1/plugins/trunk/artifact/plugin.jelly (original) +++ maven/maven-1/plugins/trunk/artifact/plugin.jelly Tue May 31 21:08:14 2005 @@ -64,6 +64,12 @@ <define:tag name="install-snapshot"> <ant:echo>Installing as a snapshot...</ant:echo> + <ant:echo> + ********************************************************** + DEPRECATED: install/deploy-snapshot goals are deprecated. + Please use install/deploy with a version set to SNAPSHOT + ********************************************************** + </ant:echo> <artifact:artifact-install-snapshot project="${project}" type="${type}" @@ -74,128 +80,42 @@ <define:tag name="deploy"> <ant:echo>Deploying...</ant:echo> - <artifact:check-legacy var="legacy" /> + <artifact:check-legacy /> - <j:choose> - <j:when test="${legacy}"> - <maven:makeRelativePath basedir="${basedir}" var="artifact" path="${artifact}" separator="/" /> - <util:file var="f" name="${artifact}" /> - <j:set var="filename" value="${f.name}" /> - <j:if test="${filename.indexOf(pom.currentVersion) == '-1'}"> - <j:set var="filename" value="${pom.artifactId}-${pom.currentVersion}.${type}" /> - <j:if test="${typeHandler != null}"> - <util:file var="f" name="${typeHandler.constructRepositoryFullPath(type, pom, pom.currentVersion)}" /> - <j:set var="filename" value="${f.name}" /> - </j:if> - </j:if> - <maven:makeRelativePath basedir="${basedir}" var="projectFilename" path="${project.file}" separator="/" /> - <j:set var="pomFilename" value="${pom.artifactId}-${pom.currentVersion}.pom" /> - <deploy:artifact - assureDirectoryCommand="mkdir -p" - type="poms" - artifact="${projectFilename}" - targetFilename="${pomFilename}" - siteCommand="cd @deployDirectory@; chmod -f g+w ${pomFilename}; chgrp -f ${maven.remote.group} ${pomFilename}" - /> - <deploy:artifact - assureDirectoryCommand="mkdir -p" - type="${type}s" - handler="${typeHandler}" - artifact="${artifact}" - targetFilename="${filename}" - siteCommand="cd @deployDirectory@; chmod -f g+w ${filename}; chgrp -f ${maven.remote.group} ${filename}" - /> - </j:when> - <j:otherwise> - <artifact:artifact-deploy - project="${project}" - type="${type}" - artifact="${artifact}" - typeHandler="${typeHandler}" - /> - </j:otherwise> - </j:choose> + <artifact:artifact-deploy + project="${project}" + type="${type}" + artifact="${artifact}" + typeHandler="${typeHandler}" + /> </define:tag> - + <define:tag name="deploy-snapshot"> <ant:echo>Deploying as snapshot...</ant:echo> - <artifact:check-legacy var="legacy" /> + <ant:echo> + ********************************************************** + DEPRECATED: install/deploy-snapshot goals are deprecated. + Please use install/deploy with a version set to SNAPSHOT + ********************************************************** + </ant:echo> + <artifact:check-legacy /> - <j:choose> - <j:when test="${legacy}"> - <maven:makeRelativePath basedir="${basedir}" var="artifact" path="${artifact}" separator="/" /> - <util:file var="f" name="${artifact}" /> - <maven:snapshot project="${pom}"/> - <j:useBean var="strings" class="org.apache.commons.lang.StringUtils"/> - <j:set var="replace" value="${pom.artifactId}-" /> - <j:set var="snapshotVersion" value='${strings.replace(snapshotSignature, replace, "")}' /> - <j:set var="filename" value="${f.name}" /> - <j:choose> - <j:when test="${filename.indexOf(pom.currentVersion) == '-1'}"> - <j:choose> - <j:when test="${typeHandler != null}"> - <util:file var="f" name="${typeHandler.constructRepositoryFullPath(type, pom, snapshotVersion)}" /> - <j:set var="timestampName" value="${f.name}" /> - <util:file var="f" name="${typeHandler.constructRepositoryFullPath(type, pom, 'SNAPSHOT')}" /> - <j:set var="snapshotName" value="${f.name}" /> - </j:when> - <j:otherwise> - <j:set var="timestampName" value="${pom.artifactId}-${snapshotVersion}.${type}" /> - <j:set var="snapshotName" value="${pom.artifactId}-SNAPSHOT.${type}" /> - </j:otherwise> - </j:choose> - </j:when> - <j:otherwise> - <j:set var="timestampName" value='${strings.replace(f.name, pom.currentVersion, snapshotVersion)}' /> - <j:set var="snapshotName" value='${strings.replace(f.name, pom.currentVersion, "SNAPSHOT")}' /> - </j:otherwise> - </j:choose> - <maven:makeRelativePath basedir="${basedir}" var="projectFilename" path="${project.file}" separator="/" /> - <j:set var="pomFilename" value="${pom.artifactId}-${snapshotVersion}.pom" /> - <j:set var="pomSnapshotName" value="${pom.artifactId}-SNAPSHOT.pom" /> - <deploy:artifact - assureDirectoryCommand="mkdir -p" - type="poms" - artifact="${projectFilename}" - targetFilename="${pomFilename}" - siteCommand="cd @deployDirectory@; chmod -f g+w ${pomFilename}; chgrp -f ${maven.remote.group} ${pomFilename}; rm -f ${pomSnapshotName}; ln -s ${pomFilename} ${pomSnapshotName}; echo ${snapshotVersion} > ${pom.artifactId}-snapshot-version" - /> - <deploy:artifact - assureDirectoryCommand="mkdir -p" - type="${type}s" - handler="${typeHandler}" - targetFilename="${timestampName}" - artifact="${artifact}" - siteCommand="cd @deployDirectory@; chmod -f g+w ${timestampName}; chgrp -f ${maven.remote.group} ${timestampName}; rm -f ${snapshotName}; ln -s ${timestampName} ${snapshotName}; echo ${snapshotVersion} > ${pom.artifactId}-snapshot-version" - /> - </j:when> - <j:otherwise> - <artifact:artifact-deploy-snapshot - project="${project}" - type="${type}" - artifact="${artifact}" - typeHandler="${typeHandler}" - /> - </j:otherwise> - </j:choose> + <artifact:artifact-deploy-snapshot + project="${project}" + type="${type}" + artifact="${artifact}" + typeHandler="${typeHandler}" + /> </define:tag> <define:tag name="check-legacy"> <j:choose> <j:when test="${context.getVariable('maven.artifact.legacy') == 'true'}"> - <ant:echo>maven.artifact.legacy is set to true - using legacy deploy mode</ant:echo> - <j:set var="${var}" value="true" scope="parent" /> - </j:when> - <j:when test="${context.getVariable('maven.artifact.legacy') == 'false'}"> - <ant:echo>maven.artifact.legacy is set to false - using artifact deploy mode</ant:echo> + <ant:fail>legacy deploy mode no longer supported - maven.artifact.legacy is set to true</ant:fail> </j:when> <j:when test="${context.getVariable('maven.repo.list') == null}"> - <ant:echo>maven.repo.list is not set - using legacy deploy mode</ant:echo> - <j:set var="${var}" value="true" scope="parent" /> + <ant:fail>legacy deploy mode no longer supported - please set maven.repo.list</ant:fail> </j:when> - <j:otherwise> - <ant:echo>maven.repo.list is set - using artifact deploy mode</ant:echo> - </j:otherwise> </j:choose> </define:tag> @@ -240,15 +160,6 @@ </ant:echo> </goal> - <!-- - | - | FIX ME: It is the additional siteCommand options that is causing the - | deploy:artifact tag to hang indefinitely. - | - | FIX ME: Deprecate these tags - | - --> - <!-- ================================================================== --> <!-- D E P L O Y A R T I F A C T T A G --> <!-- ================================================================== --> @@ -265,119 +176,7 @@ <define:taglib uri="deploy"> <define:tag name="artifact"> - - <ant:echo> - ********************************************************************************** - - DEPRECATED: use of deploy:artifact tag and the legacy deploy method are deprecated - Please specify the maven.repo.list and relevant properties instead - - ********************************************************************************** - </ant:echo> - - <!-- - || - || If the ${maven.username} value isn't set then the deployment - || process fails. - || - --> - - <j:set var="username" value='${context.getVariable("maven.username")}'/> - - <maven:user-check user="${username}"/> - - <j:set var="copier" value='${context.getVariable("maven.scp.executable")}'/> - <j:set var="commander" value='${context.getVariable("maven.ssh.executable")}'/> - - <j:set var="distributionSiteX" value="${pom.distributionSite}X"/> - <j:choose> - <j:when test="${distributionSiteX != 'X'}"> - <j:set var="siteAddress" value="${pom.distributionSite}"/> - <j:set var="siteDirectory" value="${pom.distributionDirectory}"/> - </j:when> - <j:otherwise> - <j:set var="siteAddress" value='${context.getVariable("maven.repo.central")}'/> - <j:set var="siteDirectory" value='${context.getVariable("maven.repo.central.directory")}'/> - </j:otherwise> - </j:choose> - - <j:set var="typeX" value="${type}X"/> - <j:choose> - <j:when test="${typeX != 'X'}"> - <j:set - var="resolvedDirectory" - value="${siteDirectory}/${pom.artifactDirectory}/${type}" - /> - <!-- Note: must be called something different to the artifact parameter so they don't clash --> - <j:if test="${handler != null}"> - <j:useBean var="mavenTool" class="org.apache.maven.util.MavenTool"/> - <j:set var="len" value="${type.length()-1}" /> - <j:set var="baseType" value="${type.substring(0,mavenTool.toInteger(len.toString()))}" /> - <j:set - var="resolvedDirectory" - value="${siteDirectory}/${handler.constructRepositoryDirectoryPath(baseType, pom)}" - /> - </j:if> - </j:when> - <j:otherwise> - <j:set - var="resolvedDirectory" - value="${siteDirectory}/${pom.artifactDirectory}" - /> - </j:otherwise> - </j:choose> - - <ant:echo> - Copying ${artifact} to the ${resolvedDirectory} on ${siteAddress} - </ant:echo> - - <!-- - || - || Make sure the destination directory exists. - || - --> - - <j:set var="assureDirectoryCommandX" value="${assureDirectoryCommand}X"/> - <j:if test="${assureDirectoryCommandX != 'X'}"> - <ant:exec dir="${basedir}" executable="${commander}" failonerror="true"> - <ant:arg line="${maven.ssh.args} -l ${username} ${siteAddress} '${assureDirectoryCommand} ${resolvedDirectory}'"/> - </ant:exec> - </j:if> - - <j:set var="args" value="${maven.scp.args} ${artifact} [EMAIL PROTECTED]:${resolvedDirectory}" /> - <j:if test="${targetFilename != null}"> - <j:set var="args" value="${args}/${targetFilename}" /> - </j:if> - <ant:exec dir="${basedir}" executable="${copier}" failonerror="true"> - <ant:arg line="${args}" /> - </ant:exec> - - <!-- - || - || Execute a command on the server if one is specified. - || - --> - - <j:set var="siteCommandX" value="${siteCommand}X"/> - <j:if test="${siteCommandX != 'X'}"> - - <j:useBean var="strings" class="org.apache.commons.lang.StringUtils"/> - - <j:set - var="siteCommand" - value='${strings.replace(siteCommand, "@deployDirectory@", resolvedDirectory)}' - /> - - <ant:echo> - Executing ${siteCommand} with the username ${username} on ${siteAddress} - </ant:echo> - - <ant:exec dir="${basedir}" executable="${commander}" failonerror="true"> - <ant:arg line="${maven.ssh.args} -l ${username} ${siteAddress} '${siteCommand}'"/> - </ant:exec> - - </j:if> - + <ant:fail>use of deploy:artifact tag is no longer supported. Please use the artifact:* tags instead.</ant:fail> </define:tag> <!-- ================================================================== --> Modified: maven/maven-1/plugins/trunk/artifact/xdocs/changes.xml URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/artifact/xdocs/changes.xml?rev=179349&r1=179348&r2=179349&view=diff ============================================================================== --- maven/maven-1/plugins/trunk/artifact/xdocs/changes.xml (original) +++ maven/maven-1/plugins/trunk/artifact/xdocs/changes.xml Tue May 31 21:08:14 2005 @@ -26,8 +26,8 @@ </properties> <body> <release version="1.5-SNAPSHOT" date="in SVN"> - <action dev="brett" type="update" issue="MPARTIFACT-46">Add -f flag to chmod and chgrp as they may fail even in a successful state</action> - <action dev="brett" type="update" issue="MPARTIFACT-48">Legacy method not executing from the correct directory</action> + <action dev="brett" type="update">Deprecated install-snapshot and deploy-snapshot goals</action> + <action dev="brett" type="remove">Remove deprecated old deployment method</action> <action dev="brett" type="update" issue="MAVEN-1396">Replace bulk of code with Wagon</action> </release> <release version="1.4.1" date="2004-09-29"> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]