You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by lu...@apache.org on 2004/08/15 14:58:28 UTC

cvs commit: jakarta-slide/webdavclient/ant/src/java/org/apache/webdav/ant/doc-files tasks.htm

luetzkendorf    2004/08/15 05:58:28

  Modified:    webdavclient/ant/src/java/org/apache/webdav/ant/doc-files
                        Tag: SLIDE_2_1_RELEASE_BRANCH tasks.htm
  Log:
  doc for new tasks copy and move added
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.1   +81 -11    jakarta-slide/webdavclient/ant/src/java/org/apache/webdav/ant/doc-files/tasks.htm
  
  Index: tasks.htm
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/webdavclient/ant/src/java/org/apache/webdav/ant/doc-files/tasks.htm,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- tasks.htm	24 May 2004 09:20:26 -0000	1.1
  +++ tasks.htm	15 Aug 2004 12:58:28 -0000	1.1.2.1
  @@ -1,6 +1,11 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
   <HTML><HEAD> 
  -	 <TITLE>WebDAV ant tasks</TITLE></HEAD> 
  +	 <TITLE>WebDAV ant tasks</TITLE> <STYLE TYPE="text/css">
  +	 	BODY {
  +			font-family: Arial, sans-serif;
  +		}
  +	 </STYLE> 
  +  </HEAD> 
     <BODY> 
   	 <H1>WebDAV ant tasks</H1> 
   	 <P>Tasks for Jakarta Ant for dealing with WebDAV repositories. </P> 
  @@ -11,9 +16,9 @@
   		<LI>Jakarta Slide WebDAV Client library</LI> 
   		<LI>Jakarta Commons Logging library</LI> 
   	 </UL> 
  -	 <H3>Task definitions</H3>
  +	 <H3>Task definitions</H3> 
   	 <P>Copy the four java libraries to your <TT>${ANT_HOME}/lib</TT> directory.
  -		And choose on of the following options to declare the WebDAV tasks.</P>
  +		And choose on of the following options to declare the WebDAV tasks.</P> 
   	 <P>Way 1: Declare the tasks in like the following. Daclare any name and use
   		the name for the tasks described below.</P> 
   	 <PRE> &lt;target name="declare-tasks"&gt;
  @@ -24,15 +29,17 @@
      &lt;taskdef name="mkcol"  classname="org.apache.webdav.ant.taskdefs.Mkcol"/&gt;
      &lt;taskdef name="davdelete" classname="org.apache.webdav.ant.taskdefs.Delete"/&gt;
      &lt;taskdef name="proppatch" classname="org.apache.webdav.ant.taskdefs.Proppatch"/&gt;
  - &lt;/target&gt;</PRE>
  -	 <P>Way 1a.</P>
  +   &lt;taskdef name="davcopy" classname="org.apache.webdav.ant.taskdefs.Copy"/&gt;
  +   &lt;taskdef name="davmove" classname="org.apache.webdav.ant.taskdefs.Move"/&gt;
  + &lt;/target&gt;</PRE> 
  +	 <P>Way 1a.</P> 
   	 <PRE>  &lt;target name="declare-tasks"&gt;
       &lt;taskdef resource="org/apache/webdav/ant/taskdefs.properties"/&gt;
     &lt;/target&gt;</PRE> 
   	 <P>Way 2: Declare the namespace <TT>antlib:org.apache.webdav.ant</TT>, e.g.
  -		at the <TT>project</TT> element of your <TT>build.xml</TT>. </P>
  +		at the <TT>project</TT> element of your <TT>build.xml</TT>. </P> 
   	 <PRE>  &lt;project name="site-update" 
  -					      default="upload" 
  +           default="upload" 
              xmlns:dav="antlib:org.apache.webdav.ant"&gt;
       &lt;target name="uplaod"
         &lt;dav:put url="http://${DAV.server}/${DAV.root}"
  @@ -43,10 +50,10 @@
           &lt;/dav:fileset&gt;
         &lt;/dav:put&gt;
       &lt;/target&gt;
  -  &lt;/project&gt;</PRE>
  +  &lt;/project&gt;</PRE> 
   	 <P>As you can see you use the prefix declared for the namespace
   		<TT>antlib:org.apache.webdav.ant</TT> for all WebDAV ant tasks and for all its
  -		children. (The later I didn't understand, but without it doesn't work.)</P>
  +		children. (The later I didn't understand, but without it doesn't work.)</P> 
   	 <H2>common attributes</H2> 
   	 <P>All of the ant tasks described below have the following attributes.</P> 
   	 <TABLE BORDER="1" CELLPADDING="2" CELLSPACING="0"> 
  @@ -115,12 +122,12 @@
   	 <PRE>  &lt;davget url="http://any.host.com/DAV"
             userid="${DAV.user}" password="${DAV.password}"
             todir="tmp"&gt;
  -    &lt;davfileset dir="any/colection"&gt;
  +    &lt;davfileset dir="any/collection"&gt;
         &lt;include name="**/*.xml"/&gt;
       &lt;/davfileset&gt;
     &lt;/davget&gt;</PRE> 
   	 <P>Retrieves all XML files from the DAV collection published under
  -		<TT>http://any.host.com/DAV/any/colection</TT>and its sub collections.</P> 
  +		<TT>http://any.host.com/DAV/any/collection</TT>and its sub collections.</P> 
   	 <PRE>  &lt;davget url="http://${DAV.server}/${DAV.root}/path/to/any/file.txt"
             userid="${DAV.user}" password="${DAV.password}"
             tofile="tmp/filterTest.txt" encoding="UTF-8"
  @@ -219,6 +226,69 @@
            userid="${DAV.user}" password="${DAV.password}"/&gt;</PRE> 
   	 <P>Creates a collection named <TT>/xx/yy/zz</TT>. If the collections
   		<TT>/xx</TT> and <TT>/xx/yy</TT> do not exist they are created too.</P> 
  +	 <H2><A NAME="davcopy">davcopy, dav:copy</A></H2> 
  +	 <H4>Description</H4> 
  +	 <P>Copies/renames a resource on a single WebDAV-Server.</P> 
  +	 <TABLE BORDER="1" CELLPADDING="2" CELLSPACING="0"> 
  +		<TR> 
  +		  <TD VALIGN="top"><B>Attribute</B></TD> 
  +		  <TD VALIGN="top"><B>Description</B></TD> 
  +		  <TD ALIGN="center" VALIGN="top"><B>Required</B></TD> 
  +		</TR> 
  +		<TR><TD VALIGN="top">destination</TD><TD VALIGN="top">URL to which the
  +			 source (given by the common <TT>url</TT> attribute) is to be copied.<BR>This
  +			 URL may be relative to <TT>url</TT> or an absolute one.</TD><TD VALIGN="middle"
  +		  ALIGN="center">Yes.</TD> 
  +		</TR> 
  +		<TR><TD VALIGN="top">overwrite</TD><TD VALIGN="top">Determines whether
  +			 the destination is overwritten if it always exists.</TD><TD VALIGN="middle"
  +		  ALIGN="center">No. Defaults to <TT>false</TT>.</TD> 
  +		</TR> 
  +		<TR><TD VALIGN="top">depth</TD><TD VALIGN="top">Determines whether the
  +			 copy of collections is shallow (<TT>0</TT>)or deep (<TT>infinity</TT>).</TD><TD
  +		  VALIGN="middle" ALIGN="center">No. Defaults to <TT>infinity</TT>.</TD> 
  +		</TR> 
  +	 </TABLE> 
  +	 <H4>Examples</H4> 
  +	 <PRE>   &lt;davcopy url="http://${DAV.server}/DAV/resource1" verbose="true"
  +            userid="${DAV.user}" password="${DAV.password}"
  +            destination="http://${DAV.server}/DAV/copy_of_resource1"/&gt;</PRE> 
  +	 <P>Copies <TT>resource</TT> to <TT>copy_of_resource</TT>. If
  +		<TT>resource</TT> is a collection the whole content is copied too.</P> 
  +	 <PRE>   &lt;davcopy url="http://${DAV.server}/DAV/resource1" verbose="true"
  +            userid="${DAV.user}" password="${DAV.password}"
  +            destination="copy_of_resource1"/&gt;</PRE> 
  +	 <P>Does the same as the first example, but the destination is given
  +		relative.</P> 
  +	 <H2><A NAME="davmove">davmove, dav:move</A></H2> 
  +	 <H4>Description</H4> 
  +	 <P>Moves/renames a WebDAV-resource.</P> 
  +	 <TABLE BORDER="1" CELLPADDING="2" CELLSPACING="0"> 
  +		<TR> 
  +		  <TD VALIGN="top"><B>Attribute</B></TD> 
  +		  <TD VALIGN="top"><B>Description</B></TD> 
  +		  <TD ALIGN="center" VALIGN="top"><B>Required</B></TD> 
  +		</TR> 
  +		<TR><TD VALIGN="top">destination</TD><TD VALIGN="top">URL to which the
  +			 source (given by the common <TT>url</TT> attribute) is to be moved.<BR>This URL
  +			 may be relative to <TT>url</TT> or an absolute one.</TD><TD VALIGN="middle"
  +		  ALIGN="center">Yes.</TD> 
  +		</TR> 
  +		<TR><TD VALIGN="top">overwrite</TD><TD VALIGN="top">Determines whether
  +			 the destination is overwritten if it always exists.</TD><TD VALIGN="middle"
  +		  ALIGN="center">No. Defaults to <TT>false</TT>.</TD> 
  +		</TR> 
  +	 </TABLE> 
  +	 <H4>Examples</H4> 
  +	 <PRE>   &lt;davmove url="http://${DAV.server}/DAV/resource1" verbose="true"
  +            userid="${DAV.user}" password="${DAV.password}"
  +            destination="http://${DAV.server}/DAV/resource2"/&gt;</PRE> 
  +	 <P>Renames the resource <TT>resource1</TT> to <TT>resource2</TT>.</P> 
  +	 <PRE>   &lt;davmove url="http://${DAV.server}/DAV/coll1/resource" verbose="true"
  +            userid="${DAV.user}" password="${DAV.password}"
  +            destination="/DAV/coll2/resource"/&gt;</PRE> 
  +	 <P>Moves the resource <TT>resource</TT> from collection <TT>coll1</TT> to
  +		<TT>coll2</TT> using a relative destination URL.</P> 
   	 <H2><A NAME="davdelete">davdelete, dav:delete</A></H2> 
   	 <H4>Description</H4> 
   	 <P>Deletes a WebDAV resource or a set of resources.</P> 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org