jvanzyl     02/04/11 14:21:21

  Modified:    src/templates/build build-docs.xml
  Log:
  Allow the specification of a maven.username in the maven:site-deploy target
  so that usernames on the source and target machines need not match.
  
  Martin and David Taylor couldn't deploy any sites. This should be fixed
  now.
  
  Revision  Changes    Path
  1.49      +24 -3     jakarta-turbine-maven/src/templates/build/build-docs.xml
  
  Index: build-docs.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-docs.xml,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- build-docs.xml    8 Apr 2002 01:30:44 -0000       1.48
  +++ build-docs.xml    11 Apr 2002 21:21:21 -0000      1.49
  @@ -320,8 +320,29 @@
     <!-- ================================================================== -->
   
     <target
  +    name="check-maven-username"
  +    unless="maven.username">
  +  
  +    <echo>
  +      +------------------------------------------------------------------
  +      | ERROR!
  +      |
  +      | You must specify a maven username in order to deploy the site!
  +      | You can either set this property in your ~/build.properties
  +      | or specify one on the command line:
  +      |
  +      | ant -Dmaven.user=jvanzyl maven:deploy-site
  +      +------------------------------------------------------------------
  +    </echo>
  +    
  +    <fail/>
  +    
  +  </target>
  +
  +  <target
       name="deploy-site"
  -    depends="site">
  +    depends="check-maven-username,site"
  +    if="maven.username">
   
       <echo>
         siteAddress = ${siteAddress}
  @@ -337,11 +358,11 @@
   
       <exec dir="." executable="scp">
         <arg value="${project}-site.tar.gz"/>
  -      <arg value="${siteAddress}:${homepage}"/>
  +      <arg value="${maven.username}@${siteAddress}:${homepage}"/>
       </exec>
   
       <exec dir="." executable="ssh">
  -      <arg line="${siteAddress} 'cd ${homepage};gunzip ${project}-site.tar.gz;tar 
xUvf ${project}-site.tar;chmod -R g+u *;rm ${project}-site.tar'"/>
  +      <arg line="${siteAddress} -l ${maven.username} 'cd ${homepage};gunzip 
${project}-site.tar.gz;tar xUvf ${project}-site.tar;chmod -R g+u *;rm 
${project}-site.tar'"/>
       </exec>
   
       <delete file="${project}-site.tar.gz"/>
  
  
  


Reply via email to