* fold deploy plugin into artifact plugin - make it easier to manage migration

* add legacy property to force use of deploy plugin via artifact tags
* use deploy plugin if artifact is not configured
* clean up exception handling in artifact
* utilise deploy properties in artifact plugin if it is not configured


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115480 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett 2004-06-14 13:36:48 +00:00
parent 26e6e261a6
commit fd0192ae48
23 changed files with 378 additions and 523 deletions

View File

@ -22,7 +22,11 @@
xmlns:j="jelly:core"
xmlns:define="jelly:define"
xmlns:ant="jelly:ant"
xmlns:util="jelly:util"
xmlns:maven="jelly:maven"
xmlns:velocity="jelly:velocity"
xmlns:artifact="artifact"
xmlns:deploy="deploy"
>
@ -44,15 +48,84 @@
className="org.apache.maven.artifact.deployer.DeployBean"/>
<define:jellybean
name="deploy"
name="artifact-deploy"
method="deploy"
className="org.apache.maven.artifact.deployer.DeployBean"/>
<define:jellybean
name="deploy-snapshot"
name="artifact-deploy-snapshot"
method="deploySnapshot"
className="org.apache.maven.artifact.deployer.DeployBean"/>
<define:tag name="deploy">
<artifact:check-legacy var="legacy" />
<j:choose>
<j:when test="${legacy}">
<maven:makeRelativePath basedir="${basedir}" var="artifact" path="${artifact}" separator="/" />
<util:file var="f" name="${artifact}" />
<deploy:artifact
assureDirectoryCommand="mkdir -p"
type="${type}"
artifact="${artifact}"
siteCommand="cd @deployDirectory@; chmod g+w ${f.name}; chgrp ${maven.remote.group} ${f.name}"
/>
</j:when>
<j:otherwise>
<artifact:artifact-deploy
project="${project}"
type="${type}"
artifact="${artifact}"
/>
</j:otherwise>
</j:choose>
</define:tag>
<define:tag name="deploy-snapshot">
<artifact:check-legacy var="legacy" />
<j:choose>
<j:when test="${legacy}">
<!-- TODO: what about -snapshot-versioa, SNAPSHOT symlink? -->
<!-- TODO: make artifact a relative path -->
<maven:makeRelativePath basedir="${basedir}" var="artifact" path="${artifact}" separator="/" />
<util:file var="f" name="${artifact}" />
<deploy:artifact
assureDirectoryCommand="mkdir -p"
type="${type}"
artifact="${artifact}"
siteCommand="cd @deployDirectory@; chmod g+w ${f.name}; chgrp ${maven.remote.group} ${f.name}"
/>
</j:when>
<j:otherwise>
<artifact:artifact-deploy-snapshot
project="${project}"
type="${type}"
artifact="${artifact}"
/>
</j:otherwise>
</j:choose>
</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>
<j:set var="${var}" value="true" scope="parent" />
</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" />
</j:when>
<j:otherwise>
<ant:echo>maven.repo.list is set - using artifact deploy mode</ant:echo>
</j:otherwise>
</j:choose>
</define:tag>
<!--
|
@ -90,7 +163,176 @@
</define:taglib>
<goal name="artifact:load">
<ant:echo>
DEPRECATED: you do not need to use artifact:load for plugin dependencies. Instead, use the
xmlns:artifact="artifact" notation
</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 -->
<!-- ================================================================== -->
<!-- The deploy-artifact tag is a dynamic tag that allows the -->
<!-- consistent deployment of artifacts generated by Maven. -->
<!-- -->
<!-- The following parameters can be used with the deploy-artifact -->
<!-- tag by setting the appropriate attribute when invoking the tag: -->
<!-- -->
<!-- @param artifact -->
<!-- @param type -->
<!-- @param assureDirectoryCommand -->
<!-- ================================================================== -->
<define:taglib uri="deploy">
<define:tag name="artifact">
<!--
||
|| 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}"
/>
</j:when>
<j:otherwise>
<j:set
var="resolvedDirectory"
value="${siteDirectory}/${pom.artifactDirectory}"
/>
</j:otherwise>
</j:choose>
<ant:echo>
Moving ${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="." executable="${commander}">
<ant:arg line="${maven.ssh.args} -l ${username} ${siteAddress} '${assureDirectoryCommand} ${resolvedDirectory}'"/>
</ant:exec>
</j:if>
<ant:exec dir="." executable="${copier}">
<ant:arg line="${maven.scp.args} ${artifact} ${username}@${siteAddress}:${resolvedDirectory}"/>
</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="." executable="${commander}">
<ant:arg line="${maven.ssh.args} -l ${username} ${siteAddress} '${siteCommand}'"/>
</ant:exec>
</j:if>
</define:tag>
<!-- ================================================================== -->
<!-- C O P Y D E P S -->
<!-- ================================================================== -->
<define:tag name="copy-deps">
<!--
|
| If a POM descriptor has been specified then use it.
|
-->
<j:if test="${projectDescriptor != null}">
<maven:pom var="pom" projectDescriptor="${projectDescriptor}"/>
</j:if>
<j:set var="mavenRepoLocal" value='${context.getVariable("maven.repo.local")}'/>
<ant:mkdir dir="${todir}"/>
<ant:copy todir="${todir}" flatten="true">
<!-- grab list of excludedItems up front -->
<j:if test="${excludes != ''}">
<!-- The excludes are a list of dep ids -->
<util:tokenize var="excludeItems" delim=",">${excludes}</util:tokenize>
</j:if>
<!--
! for each artifact, see if it is excluded. If not, add a fileset
! to the copy
!-->
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="excluded" value="false"/>
<j:if test="${excludes != ''}">
<!-- The excludes are a list of dep ids, check if this id is in the list -->
<j:forEach var="exclude" items="${excludeItems}">
<!-- the exclude could be either the short name (e.g. artifactId), or the id -->
<j:if test="${(lib.dependency.id == exclude) or (lib.dependency.artifactId == exclude)}">
<j:set var="excluded" value="true"/>
</j:if>
</j:forEach>
</j:if>
<j:if test="${!excluded}">
<ant:fileset dir="${lib.file.parent}">
<ant:include name="${lib.file.name}"/>
</ant:fileset>
</j:if>
</j:forEach>
</ant:copy>
</define:tag>
</define:taglib>
</project>

View File

@ -78,6 +78,12 @@
<version>1.0.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.3</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>jsch</groupId>
<artifactId>jsch</artifactId>

View File

@ -28,6 +28,8 @@ import java.util.TimeZone;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.maven.MavenConstants;
import org.apache.maven.MavenException;
import org.apache.maven.deploy.DeployTool;
@ -41,7 +43,7 @@ import org.apache.maven.util.MD5Sum;
*
*
* @author <a href="mailto:michal.maczka@dimatics.com">Michal Maczka</a>
* @version $Id: DefaultArtifactDeployer.java,v 1.18 2004/05/10 23:36:34 brett Exp $
* @version $Id: DefaultArtifactDeployer.java,v 1.19 2004/06/14 13:36:47 brett Exp $
*/
public class DefaultArtifactDeployer implements ArtifactDeployer
{
@ -77,6 +79,8 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
SNAPSHOT_SIGNATURE_FMT.setTimeZone(TimeZone.getTimeZone("GMT"));
}
private static final Log LOG = LogFactory.getLog(DefaultArtifactDeployer.class);
/**
* @see ArtifactDeployer#deploy(String, String, Project)
*
@ -279,6 +283,45 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
}
}
private String findSshIdentity() {
String key = findSshIdentity( System.getProperty( "user.home" ) );
if ( key != null ) {
return key;
}
if ( System.getProperty( "user.home" ).equals( System.getProperty( "user.home.env" ) ) == false ) {
key = findSshIdentity( System.getProperty( "user.home.env" ) );
if ( key != null ) {
return key;
}
}
LOG.warn( "Unable to locate identity id_rsa, id_dsa or identity - set maven.repo.default.privatekey" );
return null;
}
private String findSshIdentity( String home ) {
if ( home == null ) {
return null;
}
File sshHome = new File( home, ".ssh" );
LOG.debug( "Looking for SSH keys in " + sshHome );
File key = new File( sshHome, "id_dsa" );
if ( key.exists() ) {
LOG.debug( "found " + key );
return key.getAbsolutePath();
}
key = new File( sshHome, "id_rsa" );
if ( key.exists() ) {
LOG.debug( "found " + key );
return key.getAbsolutePath();
}
key = new File( sshHome, "identity" );
if ( key.exists() ) {
LOG.debug( "found " + key );
return key.getAbsolutePath();
}
return null;
}
/**
* @param artifact
* @param type
@ -296,15 +339,29 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
String repoStr =
(String) project.getContext().getVariable("maven.repo.list");
if (repoStr == null || repoStr.length() == 0)
if (repoStr == null || repoStr.trim().length() == 0)
{
System.out.println("No remote repository was defined.");
return;
String central = (String) project.getContext().getVariable("maven.repo.central");
if (central != null && central.trim().length() > 0) {
repoStr = "default";
project.getContext().setVariable("maven.repo.default", "scp://" + central);
if ( project.getContext().getVariable("maven.repo.default.privatekey") == null ) {
project.getContext().setVariable("maven.repo.default.privatekey", findSshIdentity());
}
if ( project.getContext().getVariable("maven.repo.default.passphrase") == null ) {
LOG.warn( "WARNING: assuming empty passphrase. Specify maven.repo.default.passphrase if needed" );
project.getContext().setVariable("maven.repo.default.passphrase", "");
}
project.getContext().setVariable("maven.repo.default.directory", project.getContext().getVariable("maven.repo.central.directory"));
project.getContext().setVariable("maven.repo.default.username", project.getContext().getVariable("maven.username"));
project.getContext().setVariable("maven.repo.default.group", project.getContext().getVariable("maven.remote.group"));
}
}
String[] repos = StringUtils.split(repoStr, ",");
System.out.println(
"Will deploy to " + repos.length + " repository(ies): " + repoStr);
System.out.println( "Will deploy to " + repos.length + " repository(ies): " + repoStr);
boolean success = false;
for (int i = 0; i < repos.length; i++)
{
@ -317,6 +374,7 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
RepositoryInfoBuilder.getRepositoryInfo(project, repo);
deployTool.deploy(repoInfo, srcFiles, destFiles);
success = true;
}
catch (Exception e)
{
@ -325,13 +383,16 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
+ repoInfo.getRepositoryAlias()
+ " Reason: "
+ e.getMessage();
System.out.print(msg);
LOG.warn(msg);
LOG.debug(e);
// deploy to next repository
e.printStackTrace();
continue;
}
}
if ( !success ) {
throw new MavenException("Unable to deploy to any repositories");
}
}
/**

View File

@ -30,7 +30,7 @@ import org.apache.maven.deploy.exceptions.TransferFailedException;
* file system.
*
* @author <a href="mailto:michal.maczka@dimatics.com">Michal Maczka</a>
* @version $Id: FileDeployer.java,v 1.13 2004/05/02 15:04:34 vmassol Exp $
* @version $Id: FileDeployer.java,v 1.14 2004/06/14 13:36:48 brett Exp $
*/
public class FileDeployer extends AbstractDeployer
{
@ -79,7 +79,7 @@ public class FileDeployer extends AbstractDeployer
catch (IOException e)
{
throw new TransferFailedException(
"Cannot copy file: " + e.getMessage());
"Cannot copy file: " + e.getMessage(), e);
}
}
}

View File

@ -40,7 +40,7 @@ import org.apache.maven.deploy.exceptions.TransferFailedException;
*
* @author <a href="mailto:jason@zenplex.com">Jason van Zyl</a>
* @author <a href="mailto:michal.maczka@dimatics.com">Michal Maczka</a>
* @version $Id: FtpDeployer.java,v 1.9 2004/05/02 15:04:34 vmassol Exp $
* @version $Id: FtpDeployer.java,v 1.10 2004/06/14 13:36:48 brett Exp $
*
* @todo review exception handling
*
@ -108,7 +108,7 @@ public class FtpDeployer extends AbstractDeployer
// do nothing
}
}
throw new AuthenticationException("Could not connect to server.");
throw new AuthenticationException("Could not connect to server.",e);
}
try
@ -130,7 +130,7 @@ public class FtpDeployer extends AbstractDeployer
}
catch (IOException e)
{
throw new AuthenticationException("Cannot login to remote system");
throw new AuthenticationException("Cannot login to remote system",e);
}
}
@ -179,8 +179,7 @@ public class FtpDeployer extends AbstractDeployer
}
catch (Exception e)
{
e.printStackTrace();
throw new TransferFailedException(e.getMessage());
throw new TransferFailedException(e.getMessage(),e);
}
}

View File

@ -40,7 +40,7 @@ import com.jcraft.jsch.UserInfo;
* and if that doesn't work then we fall back
* to using the login and password
*
* @version $Id: GenericSshDeployer.java,v 1.8 2004/03/02 14:59:31 evenisse Exp $
* @version $Id: GenericSshDeployer.java,v 1.9 2004/06/14 13:36:48 brett Exp $
* @todo still have to account for differing setups for people deploying to
* their own sites and to the central repository.
* @todo improve exception handling
@ -167,7 +167,6 @@ public abstract class GenericSshDeployer extends AbstractDeployer
}
catch (Exception e)
{
e.printStackTrace();
throw new AuthenticationException(
"Cannot connect. Reason: " + e.getMessage(),
e);

View File

@ -32,7 +32,7 @@ import com.jcraft.jsch.SftpProgressMonitor;
* An SSH2/SFTP deployer
*
* @author Michal Maczka
* @version $Revision: 1.9 $ $Date: 2004/03/02 14:59:31 $
* @version $Revision: 1.10 $ $Date: 2004/06/14 13:36:48 $
*/
public class SFtpDeployer extends GenericSshDeployer
{
@ -78,7 +78,7 @@ public class SFtpDeployer extends GenericSshDeployer
}
catch (Exception e)
{
throw new AuthenticationException(e.getMessage());
throw new AuthenticationException(e.getMessage(),e);
}
}

View File

@ -39,7 +39,7 @@ import java.util.List;
* An SSH2/SCP deployer
*
* @author Michal Maczka
* @version $Revision: 1.9 $ $Date: 2004/05/12 12:33:55 $
* @version $Revision: 1.10 $ $Date: 2004/06/14 13:36:48 $
*/
public class ScpDeployer extends GenericSshDeployer
{
@ -180,7 +180,7 @@ public class ScpDeployer extends GenericSshDeployer
}
}
throw new TransferFailedException("Cannot create ZIP file");
throw new TransferFailedException("Cannot create ZIP file",e);
}
try
@ -264,7 +264,7 @@ public class ScpDeployer extends GenericSshDeployer
catch (Exception e)
{
throw new TransferFailedException(
"Cannot execute remote command: " + command);
"Cannot execute remote command: " + command,e);
}
finally
{

View File

@ -26,6 +26,7 @@
</properties>
<body>
<release version="1.3" date="In CVS">
<action dev="brett" type="add">Absorb the deploy plugin to give one point of migration</action>
<action dev="brett" type="fix">Build and run against the installed version of Maven</action>
<action dev="evenisse" type="fix" due-to="Martin van den Bemt" issue="MPJAR-29">Replace Apache Jakarta Maven by Apache Maven in Manifest</action>
</release>

View File

@ -137,5 +137,51 @@
section from the <b>Maven User Guide</b> .
</p>
</section>
<section name="Deploy Properties (DEPRECATED)">
<table>
<tr>
<td>maven.artifact.legacy</td>
<td>Yes</td>
<td>
Force legacy (deploy) operation mode, where the SSH and SCP command line tools are used.
If artifact is not configured, this will take effect automatically.
</td>
</tr>
<tr>
<td>maven.scp.executable</td>
<td>Yes</td>
<td>
Specifies the name (and possibly location) of the remote secure
copy executable to use (SCP).
The default value is <code>scp</code> (i.e. an executable
named <code>scp</code> must be in your path).
</td>
</tr>
<tr>
<td>maven.scp.args</td>
<td>Yes</td>
<td>
Specifies optional parameters that are passed to the scp executable.
</td>
</tr>
<tr>
<td>maven.ssh.executable</td>
<td>Yes</td>
<td>
Specifies the name (and possibly location) of the remote secure
shell executable to use (SSH).
The default value is <code>ssh</code> (i.e. an executable
named <code>ssh</code> must be in your path).
</td>
</tr>
<tr>
<td>maven.ssh.args</td>
<td>Yes</td>
<td>
Specifies optional parameters that are passed to the ssh executable.
</td>
</tr>
</table>
</section>
</body>
</document>

View File

@ -1,4 +0,0 @@
target
velocity.log
maven.log
build.properties

View File

@ -1,194 +0,0 @@
<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven"
xmlns:define="jelly:define"
xmlns:deploy="deploy"
xmlns:util="jelly:util"
xmlns:log="jelly:log">
<!--
|
| FIX ME: It is the additional siteCommand options that is causing the
| deploy:artifact tag to hang indefinitely.
|
-->
<!-- ================================================================== -->
<!-- D E P L O Y A R T I F A C T T A G -->
<!-- ================================================================== -->
<!-- The deploy-artifact tag is a dynamic tag that allows the -->
<!-- consistent deployment of artifacts generated by Maven. -->
<!-- -->
<!-- The following parameters can be used with the deploy-artifact -->
<!-- tag by setting the appropriate attribute when invoking the tag: -->
<!-- -->
<!-- @param artifact -->
<!-- @param type -->
<!-- @param assureDirectoryCommand -->
<!-- ================================================================== -->
<define:taglib uri="deploy">
<define:tag name="artifact">
<!--
||
|| 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}"
/>
</j:when>
<j:otherwise>
<j:set
var="resolvedDirectory"
value="${siteDirectory}/${pom.artifactDirectory}"
/>
</j:otherwise>
</j:choose>
<ant:echo>
Moving ${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="." executable="${commander}">
<ant:arg line="${maven.ssh.args} -l ${username} ${siteAddress} '${assureDirectoryCommand} ${resolvedDirectory}'"/>
</ant:exec>
</j:if>
<ant:exec dir="." executable="${copier}">
<ant:arg line="${maven.scp.args} ${artifact} ${username}@${siteAddress}:${resolvedDirectory}"/>
</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="." executable="${commander}">
<ant:arg line="${maven.ssh.args} -l ${username} ${siteAddress} '${siteCommand}'"/>
</ant:exec>
</j:if>
</define:tag>
<!-- ================================================================== -->
<!-- C O P Y D E P S -->
<!-- ================================================================== -->
<define:tag name="copy-deps">
<!--
|
| If a POM descriptor has been specified then use it.
|
-->
<j:if test="${projectDescriptor != null}">
<maven:pom var="pom" projectDescriptor="${projectDescriptor}"/>
</j:if>
<j:set var="mavenRepoLocal" value='${context.getVariable("maven.repo.local")}'/>
<ant:mkdir dir="${todir}"/>
<ant:copy todir="${todir}" flatten="true">
<!-- grab list of excludedItems up front -->
<j:if test="${excludes != ''}">
<!-- The excludes are a list of dep ids -->
<util:tokenize var="excludeItems" delim=",">${excludes}</util:tokenize>
</j:if>
<!--
! for each artifact, see if it is excluded. If not, add a fileset
! to the copy
!-->
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="excluded" value="false"/>
<j:if test="${excludes != ''}">
<!-- The excludes are a list of dep ids, check if this id is in the list -->
<j:forEach var="exclude" items="${excludeItems}">
<!-- the exclude could be either the short name (e.g. artifactId), or the id -->
<j:if test="${(lib.dependency.id == exclude) or (lib.dependency.artifactId == exclude)}">
<j:set var="excluded" value="true"/>
</j:if>
</j:forEach>
</j:if>
<j:if test="${!excluded}">
<ant:fileset dir="${lib.file.parent}">
<ant:include name="${lib.file.name}"/>
</ant:fileset>
</j:if>
</j:forEach>
</ant:copy>
</define:tag>
</define:taglib>
</project>

View File

@ -1,19 +0,0 @@
# -------------------------------------------------------------------
# Copyright 2001-2004 The Apache Software Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------
# -------------------------------------------------------------------
# P R O J E C T P R O P E R T I E S
# -------------------------------------------------------------------

View File

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project>
<extend>../plugin-parent/project.xml</extend>
<pomVersion>3</pomVersion>
<id>maven-deploy-plugin</id>
<name>Maven Deploy Plugin</name>
<currentVersion>1.3</currentVersion>
<description/>
<shortDescription>Deploy to remote repository</shortDescription>
<url>http://maven.apache.org/reference/plugins/deploy/</url>
<issueTrackingUrl>http://jira.codehaus.org/BrowseProject.jspa?id=10330</issueTrackingUrl>
<siteDirectory>/www/maven.apache.org/reference/plugins/deploy/</siteDirectory>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/deploy/</connection>
<developerConnection>scm:cvs:ext:${maven.username}@cvs.apache.org:/home/cvs:maven-plugins/deploy/</developerConnection>
<url>http://cvs.apache.org/viewcvs/maven-plugins/deploy/</url>
</repository>
<versions>
<version>
<id>1.2</id>
<name>1.2</name>
<tag>MAVEN_DEPLOY_1_2</tag>
</version>
<version>
<id>1.3</id>
<name>1.3</name>
<tag>MAVEN_DEPLOY_1_3</tag>
</version>
</versions>
<developers>
<developer>
<name>Stéphane Mor</name>
<id>smor</id>
<email>stephanemor@yahoo.fr</email>
<organization>Hasgard Systèmes et Réseaux</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
<developer>
<name>Jason van Zyl</name>
<id>jvanzyl</id>
<email>jason@zenplex.com</email>
<organization>Zenplex</organization>
<roles>
<role>Architect</role>
<role>Release Manager</role>
</roles>
</developer>
</developers>
<dependencies/>
</project>

View File

@ -1 +0,0 @@
stylesheets

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<document>
<properties>
<title>Changes for the Deploy plugin</title>
<author email="vmassol@apache.org">Vincent Massol</author>
</properties>
<body>
<release version="1.3" date="2004-05-15">
<action dev="evenisse" type="add" issue="MPDEPLOY-2">Add optional maven.ssh.args and maven.scp.args.</action>
</release>
<release version="1.2" date="2003-11-22">
<action dev="vmassol" type="add">Probably lots of things but nobody was counting...</action>
</release>
</body>
</document>

View File

@ -1,40 +0,0 @@
<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<document>
<properties>
<title>Maven Deploy goals</title>
<author email="dion@multitask.com.au">dIon Gillard</author>
</properties>
<body>
<section name="Goals">
<table>
<tr><th>Goal</th><th>Description</th></tr>
<tr>
<td>deploy:pom</td>
<td>
Deploy project.xml, a.k.a. the POM to the central repository.
</td>
</tr>
</table>
</section>
</body>
</document>

View File

@ -1,36 +0,0 @@
<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<document>
<properties>
<title>Maven Deployment Plug-in</title>
<author email="jason@zenplex.com">Jason van Zyl</author>
</properties>
<body>
<section name="Maven Deployment Plug-in">
<p>
This plugin is a general deployment mechanism used for deploying
artifacts into the central Maven repository and for deploying
a project's site.
</p>
</section>
</body>
</document>

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project name="Maven Deploy Plugin">
<title>Maven Deploy Plugin</title>
<body>
<links>
<item name="Maven" href="http://maven.apache.org/"/>
</links>
<menu name="Overview">
<item name="Goals" href="/goals.html" />
<item name="Properties" href="/properties.html" />
</menu>
</body>
</project>

View File

@ -1,67 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<document>
<properties>
<title>Deploy Properties</title>
<author email="smor@apache.org">Stéphane MOR</author>
</properties>
<body>
<section name="Deploy Properties">
<table>
<tr>
<td>maven.scp.executable</td>
<td>Yes</td>
<td>
Specifies the name (and possibly location) of the remote secure
copy executable to use (SCP). This is used by the "deploy:pom" goal.
The default value is <code>scp</code> (i.e. an executable
named <code>scp</code> must be in your path).
</td>
</tr>
<tr>
<td>maven.scp.args</td>
<td>Yes</td>
<td>
Specifies optional parameters that are passed to the scp executable.
</td>
</tr>
<tr>
<td>maven.ssh.executable</td>
<td>Yes</td>
<td>
Specifies the name (and possibly location) of the remote secure
shell executable to use (SSH). This is used by the "deploy:pom" goal.
The default value is <code>ssh</code> (i.e. an executable
named <code>ssh</code> must be in your path).
</td>
</tr>
<tr>
<td>maven.ssh.args</td>
<td>Yes</td>
<td>
Specifies optional parameters that are passed to the ssh executable.
</td>
</tr>
</table>
</section>
</body>
</document>