brett       2004/06/14 06:36:48

  Modified:    artifact plugin.jelly project.xml
               artifact/src/main/org/apache/maven/artifact/deployer
                        DefaultArtifactDeployer.java
               artifact/src/main/org/apache/maven/deploy/deployers
                        FileDeployer.java FtpDeployer.java
                        GenericSshDeployer.java SFtpDeployer.java
                        ScpDeployer.java
               artifact/xdocs changes.xml properties.xml
  Added:       artifact/src/plugin-test .cvsignore maven.xml project.xml
  Removed:     deploy   .cvsignore plugin.jelly project.properties
                        project.xml
               deploy/src/plugin-test .cvsignore maven.xml project.xml
               deploy/xdocs .cvsignore changes.xml goals.xml index.xml
                        navigation.xml properties.xml
  Log:
  * 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
  
  Revision  Changes    Path
  1.5       +244 -2    maven-plugins/artifact/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/artifact/plugin.jelly,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- plugin.jelly      4 Mar 2004 17:59:38 -0000       1.4
  +++ plugin.jelly      14 Jun 2004 13:36:47 -0000      1.5
  @@ -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} [EMAIL 
PROTECTED]:${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>
  +
  
  
  
  1.26      +6 -0      maven-plugins/artifact/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/artifact/project.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- project.xml       11 Jun 2004 09:36:41 -0000      1.25
  +++ project.xml       14 Jun 2004 13:36:47 -0000      1.26
  @@ -79,6 +79,12 @@
         <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>
         <version>0.1.5</version>
  
  
  
  1.19      +69 -8     
maven-plugins/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
  
  Index: DefaultArtifactDeployer.java
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DefaultArtifactDeployer.java      10 May 2004 23:36:34 -0000      1.18
  +++ DefaultArtifactDeployer.java      14 Jun 2004 13:36:47 -0000      1.19
  @@ -28,6 +28,8 @@
   
   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;
  @@ -77,6 +79,8 @@
           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 @@
           }
       }
   
  +    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 @@
           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 @@
                       RepositoryInfoBuilder.getRepositoryInfo(project, repo);
   
                   deployTool.deploy(repoInfo, srcFiles, destFiles);
  +                success = true;
               }
               catch (Exception e)
               {
  @@ -325,12 +383,15 @@
                           + 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");
           }
       }
   
  
  
  
  1.14      +2 -2      
maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/FileDeployer.java
  
  Index: FileDeployer.java
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/FileDeployer.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FileDeployer.java 2 May 2004 15:04:34 -0000       1.13
  +++ FileDeployer.java 14 Jun 2004 13:36:48 -0000      1.14
  @@ -79,7 +79,7 @@
           catch (IOException e)
           {
               throw new TransferFailedException(
  -                "Cannot copy file: " + e.getMessage());
  +                "Cannot copy file: " + e.getMessage(), e);
           }
       }
   }
  
  
  
  1.10      +4 -5      
maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/FtpDeployer.java
  
  Index: FtpDeployer.java
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/FtpDeployer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FtpDeployer.java  2 May 2004 15:04:34 -0000       1.9
  +++ FtpDeployer.java  14 Jun 2004 13:36:48 -0000      1.10
  @@ -108,7 +108,7 @@
                       // do nothing
                   }
               }
  -            throw new AuthenticationException("Could not connect to server.");
  +            throw new AuthenticationException("Could not connect to server.",e);
           }
   
           try
  @@ -130,7 +130,7 @@
           }
           catch (IOException e)
           {
  -            throw new AuthenticationException("Cannot login to remote system");
  +            throw new AuthenticationException("Cannot login to remote system",e);
           }
   
       }
  @@ -179,8 +179,7 @@
           }
           catch (Exception e)
           {
  -            e.printStackTrace();
  -            throw new TransferFailedException(e.getMessage());
  +            throw new TransferFailedException(e.getMessage(),e);
           }
   
       }
  
  
  
  1.9       +1 -2      
maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/GenericSshDeployer.java
  
  Index: GenericSshDeployer.java
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/GenericSshDeployer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- GenericSshDeployer.java   2 Mar 2004 14:59:31 -0000       1.8
  +++ GenericSshDeployer.java   14 Jun 2004 13:36:48 -0000      1.9
  @@ -167,7 +167,6 @@
           }
           catch (Exception e)
           {
  -            e.printStackTrace();
               throw new AuthenticationException(
                   "Cannot connect. Reason: " + e.getMessage(),
                   e);
  
  
  
  1.10      +2 -2      
maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/SFtpDeployer.java
  
  Index: SFtpDeployer.java
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/SFtpDeployer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SFtpDeployer.java 2 Mar 2004 14:59:31 -0000       1.9
  +++ SFtpDeployer.java 14 Jun 2004 13:36:48 -0000      1.10
  @@ -78,7 +78,7 @@
           }
           catch (Exception e)
           {
  -            throw new AuthenticationException(e.getMessage());
  +            throw new AuthenticationException(e.getMessage(),e);
           }
   
       }
  
  
  
  1.10      +3 -3      
maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/ScpDeployer.java
  
  Index: ScpDeployer.java
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/ScpDeployer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ScpDeployer.java  12 May 2004 12:33:55 -0000      1.9
  +++ ScpDeployer.java  14 Jun 2004 13:36:48 -0000      1.10
  @@ -180,7 +180,7 @@
                   }
               }
   
  -            throw new TransferFailedException("Cannot create ZIP file");
  +            throw new TransferFailedException("Cannot create ZIP file",e);
           }
   
           try
  @@ -264,7 +264,7 @@
           catch (Exception e)
           {
               throw new TransferFailedException(
  -                "Cannot execute remote command: " + command);
  +                "Cannot execute remote command: " + command,e);
           }
           finally
           {
  
  
  
  1.1                  maven-plugins/artifact/src/plugin-test/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  *.log
  
  
  
  1.1                  maven-plugins/artifact/src/plugin-test/maven.xml
  
  Index: maven.xml
  ===================================================================
  <!-- 
  /*
   * 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:u="jelly:util"
           xmlns:deploy="deploy">
  
    <goal name="testPlugin" prereqs="clean,test-deploy">
      <attainGoal name="clean"/>
    </goal>
    
    <goal name="test-deploy">
      <deploy:copy-deps 
        todir="${maven.build.dir}"
        excludes="commons-logging" />
  
      <!-- check that an exclude with just id works -->
      <j:set var="unExpectedFile" 
        value="${maven.build.dir}/commons-logging-1.0.3.jar"/>
      <u:file var="file" name="${unExpectedFile}" />
      <j:if test="${(file.exists())}">
        <fail>${unExpectedFile} should not have been copied</fail>
      </j:if>
      <j:set var="expectedFile" 
        value="${maven.build.dir}/commons-lang-2.0.jar"/>
      <u:file var="file" name="${expectedFile}" />
      <j:if test="${!(file.exists())}">
        <fail>${expectedFile} should have been copied</fail>
      </j:if>
  
      <attainGoal name="clean"/>
      
      <!-- check one with groupId:artifactId works -->
      <deploy:copy-deps 
        todir="${maven.build.dir}"
        excludes="commons-lang:commons-lang" />
      <j:set var="unExpectedFile" 
        value="${maven.build.dir}/commons-lang-2.0.jar"/>
      <u:file var="file" name="${unExpectedFile}" />
      <j:if test="${(file.exists())}">
        <fail>${unExpectedFile} should not have been copied</fail>
      </j:if>
      <j:set var="expectedFile" 
        value="${maven.build.dir}/commons-logging-1.0.3.jar"/>
      <u:file var="file" name="${expectedFile}" />
      <j:if test="${!(file.exists())}">
        <fail>${expectedFile} should have been copied</fail>
      </j:if>
      
    </goal>
  </project>
  
  
  1.1                  maven-plugins/artifact/src/plugin-test/project.xml
  
  Index: project.xml
  ===================================================================
  <?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>
    <pomVersion>3</pomVersion>
    <name>Test project for Maven Deploy Plugin</name>
    <id>test-maven-deploy-plugin</id>
    <currentVersion>1.0-SNAPSHOT</currentVersion>
    <organization>
      <name>Nettec</name>
      <url>http://www.nettec.net</url>
    </organization>
    <inceptionYear>2002</inceptionYear>
    <package>net.nettec.marsh.begin</package>
    <shortDescription>Marsh Begin TTS Maven</shortDescription>
    <description>TTS Begin</description>
    <url/>
    <issueTrackingUrl>http://bugzilla</issueTrackingUrl>
    <siteAddress>www.nettec.net</siteAddress>
    <siteDirectory/>
    <distributionDirectory/>
    <repository>
      <connection>scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:maven</connection>
      <url>http://cvs.apache.org/viewcvs/maven/</url>
    </repository>
    <versions/>
    <mailingLists/>
    <developers>
      <developer>
        <name>Nathan Coast</name>
        <id>nathanc</id>
        <email>[EMAIL PROTECTED]</email>
        <organization>Shadow Solutions</organization>
        <role>Java Developer</role>
      </developer>
    </developers>
    <dependencies>
      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.0.3</version>
        <url>http://jakarta.apache.org/commons/logging.html</url>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.0</version>
        <url>http://jakarta.apache.org/commons/logging.html</url>
      </dependency>
    </dependencies>
    <build>
      <nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
    </build>
  </project>
  
  
  
  1.17      +1 -0      maven-plugins/artifact/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/artifact/xdocs/changes.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- changes.xml       13 Jun 2004 05:26:16 -0000      1.16
  +++ changes.xml       14 Jun 2004 13:36:48 -0000      1.17
  @@ -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>
  
  
  
  1.8       +46 -0     maven-plugins/artifact/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/artifact/xdocs/properties.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- properties.xml    12 May 2004 12:33:55 -0000      1.7
  +++ properties.xml    14 Jun 2004 13:36:48 -0000      1.8
  @@ -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>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to