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> <target name="declare-tasks">
@@ -24,15 +29,17 @@
<taskdef name="mkcol" classname="org.apache.webdav.ant.taskdefs.Mkcol"/>
<taskdef name="davdelete" classname="org.apache.webdav.ant.taskdefs.Delete"/>
<taskdef name="proppatch" classname="org.apache.webdav.ant.taskdefs.Proppatch"/>
- </target></PRE>
- <P>Way 1a.</P>
+ <taskdef name="davcopy" classname="org.apache.webdav.ant.taskdefs.Copy"/>
+ <taskdef name="davmove" classname="org.apache.webdav.ant.taskdefs.Move"/>
+ </target></PRE>
+ <P>Way 1a.</P>
<PRE> <target name="declare-tasks">
<taskdef resource="org/apache/webdav/ant/taskdefs.properties"/>
</target></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> <project name="site-update"
- default="upload"
+ default="upload"
xmlns:dav="antlib:org.apache.webdav.ant">
<target name="uplaod"
<dav:put url="http://${DAV.server}/${DAV.root}"
@@ -43,10 +50,10 @@
</dav:fileset>
</dav:put>
</target>
- </project></PRE>
+ </project></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> <davget url="http://any.host.com/DAV"
userid="${DAV.user}" password="${DAV.password}"
todir="tmp">
- <davfileset dir="any/colection">
+ <davfileset dir="any/collection">
<include name="**/*.xml"/>
</davfileset>
</davget></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> <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}"/></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> <davcopy url="http://${DAV.server}/DAV/resource1" verbose="true"
+ userid="${DAV.user}" password="${DAV.password}"
+ destination="http://${DAV.server}/DAV/copy_of_resource1"/></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> <davcopy url="http://${DAV.server}/DAV/resource1" verbose="true"
+ userid="${DAV.user}" password="${DAV.password}"
+ destination="copy_of_resource1"/></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> <davmove url="http://${DAV.server}/DAV/resource1" verbose="true"
+ userid="${DAV.user}" password="${DAV.password}"
+ destination="http://${DAV.server}/DAV/resource2"/></PRE>
+ <P>Renames the resource <TT>resource1</TT> to <TT>resource2</TT>.</P>
+ <PRE> <davmove url="http://${DAV.server}/DAV/coll1/resource" verbose="true"
+ userid="${DAV.user}" password="${DAV.password}"
+ destination="/DAV/coll2/resource"/></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