You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by mb...@apache.org on 2022/03/10 22:13:41 UTC

[ant-antlibs-s3] branch main updated (71ed6a9 -> 6b2f913)

This is an automated email from the ASF dual-hosted git repository.

mbenson pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/ant-antlibs-s3.git.


    from 71ed6a9  add .asf.yaml
     new 0a571c3  tweak
     new b81ff5a  support Duration
     new 6b2f913  first cut of documentation

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/index.html                                    |  96 ++++++++++++++++
 .../s3/antlib.xml => docs/inlineproperties.html    |  26 +++--
 docs/s3client.html                                 |  80 ++++++++++++++
 .../ant/s3/antlib.xml => docs/s3compareselect.html |  25 +++--
 docs/s3delete.html                                 |  82 ++++++++++++++
 docs/s3object.html                                 |  80 ++++++++++++++
 docs/s3objects.html                                | 122 +++++++++++++++++++++
 docs/s3put.html                                    |  96 ++++++++++++++++
 docs/style.css                                     |  63 +++++++++++
 src/main/org/apache/ant/s3/Put.java                |  34 +++++-
 src/main/org/apache/ant/s3/StringConversions.java  |   2 +
 11 files changed, 684 insertions(+), 22 deletions(-)
 create mode 100644 docs/index.html
 copy src/main/org/apache/ant/s3/antlib.xml => docs/inlineproperties.html (63%)
 create mode 100644 docs/s3client.html
 copy src/main/org/apache/ant/s3/antlib.xml => docs/s3compareselect.html (64%)
 create mode 100644 docs/s3delete.html
 create mode 100644 docs/s3object.html
 create mode 100644 docs/s3objects.html
 create mode 100644 docs/s3put.html
 create mode 100644 docs/style.css

[ant-antlibs-s3] 01/03: tweak

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mbenson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ant-antlibs-s3.git

commit 0a571c367c37b188c55d92181682cd39324801fe
Author: Matt Benson <mb...@apache.org>
AuthorDate: Thu Mar 10 16:13:10 2022 -0600

    tweak
---
 src/main/org/apache/ant/s3/Put.java | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)

diff --git a/src/main/org/apache/ant/s3/Put.java b/src/main/org/apache/ant/s3/Put.java
index f650f27..7154bca 100644
--- a/src/main/org/apache/ant/s3/Put.java
+++ b/src/main/org/apache/ant/s3/Put.java
@@ -49,7 +49,7 @@ public class Put extends CopyResources {
      *
      * @param s3
      */
-    public void addConfigured(final Client s3) {
+    public void addConfigured(Client s3) {
         if (this.s3 != null) {
             throw new BuildException("S3 client already specified");
         }
@@ -61,7 +61,7 @@ public class Put extends CopyResources {
      *
      * @param refid
      */
-    public void setClientRefid(final String refid) {
+    public void setClientRefid(String refid) {
         Objects.requireNonNull(StringUtils.trimToNull(refid), "@clientrefid must not be null/empty/blank");
 
         addConfigured(getProject().<Client> getReference(refid));
@@ -81,7 +81,7 @@ public class Put extends CopyResources {
      *
      * @param bucket
      */
-    public void setBucket(final String bucket) {
+    public void setBucket(String bucket) {
         this.bucket = StringUtils.trimToNull(bucket);
     }
 
@@ -93,7 +93,7 @@ public class Put extends CopyResources {
      *             if {@code append == true}
      */
     @Override
-    public void setAppend(final boolean append) {
+    public void setAppend(boolean append) {
         Exceptions.raiseIf(append, buildExceptionAt(getLocation()), "@append not supported by %s", getTaskName());
     }
 
@@ -105,12 +105,34 @@ public class Put extends CopyResources {
      *             if {@code preserveLastModified == true}
      */
     @Override
-    public void setPreserveLastModified(final boolean preserveLastModified) {
+    public void setPreserveLastModified(boolean preserveLastModified) {
         Exceptions.raiseIf(preserveLastModified, buildExceptionAt(getLocation()),
             "@preserveLastModified not supported by %s", getTaskName());
     }
 
     /**
+     * Enforce "always overwrite."
+     * @return {@code true}
+     */
+    @Override
+    public boolean isOverwrite() {
+        return true;
+    }
+
+    /**
+     * Disable {@code overwrite}.
+     * 
+     * @param overwrite
+     * @throws BuildException
+     *             if {@code overwrite == false}
+     */
+    @Override
+    public void setOverwrite(boolean overwrite) {
+        Exceptions.raiseUnless(overwrite, buildExceptionAt(getLocation()), "%s only operates in overwrite mode",
+            getTaskName());
+    }
+
+    /**
      * {@inheritDoc}
      */
     @Override
@@ -136,7 +158,7 @@ public class Put extends CopyResources {
      * {@inheritDoc}
      */
     @Override
-    protected void copyResource(final Resource source, final Resource dest, final FilterSetCollection filters,
+    protected void copyResource(Resource source, Resource dest, FilterSetCollection filters,
         final Vector<FilterChain> filterChains) throws IOException {
 
         while (filterChains.isEmpty() && !filters.hasFilters()) {

[ant-antlibs-s3] 03/03: first cut of documentation

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mbenson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ant-antlibs-s3.git

commit 6b2f913ad126cb2443864829a7802d99b7188dd5
Author: Matt Benson <mb...@apache.org>
AuthorDate: Thu Mar 10 16:13:36 2022 -0600

    first cut of documentation
---
 docs/index.html            |  96 +++++++++++++++++++++++++++++++++++
 docs/inlineproperties.html |  36 +++++++++++++
 docs/s3client.html         |  80 +++++++++++++++++++++++++++++
 docs/s3compareselect.html  |  35 +++++++++++++
 docs/s3delete.html         |  82 ++++++++++++++++++++++++++++++
 docs/s3object.html         |  80 +++++++++++++++++++++++++++++
 docs/s3objects.html        | 122 +++++++++++++++++++++++++++++++++++++++++++++
 docs/s3put.html            |  96 +++++++++++++++++++++++++++++++++++
 docs/style.css             |  63 +++++++++++++++++++++++
 9 files changed, 690 insertions(+)

diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..828748f
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,96 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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
+
+       https://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.
+-->
+<html>
+  <head>
+    <meta http-equiv="Content-Language" content="en-us"></meta>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <title>S3 Ant Library</title>
+  </head>
+
+  <body>
+    <h2>Introduction</h2>
+
+    <p>This is a library of Ant type definitions that support working with
+       Amazon Web Services' Simple Storage Service AKA S3.</p>
+
+    <h2>Requirements</h2>
+
+    <p>The current version requires Ant 1.10.7 or later.</p>
+
+    <h2>Where is it?</h2>
+
+    <p>The source code for the library lives in the
+    ant-antlibs-s3 git repository - <a
+    href="https://gitbox.apache.org/repos/asf?p=ant-antlibs-s3.git">https://gitbox.apache.org/repos/asf/ant-antlibs-s3.git</a>.</p>
+
+    <h2>Installation</h2>
+
+    <p>If you are building this from sources, run the antlib target
+    and you'll get a file <code>ant-s3.jar</code>.</p>
+
+    <p>The defined types are named so as to encourage their use via
+       namespace declaration.  Place <code>ant-s3.jar</code>
+      into a directory and use <code>ant -lib
+      DIR-CONTAINING-THE-JAR</code> or copy it into
+      <code>ANT_HOME/lib</code> - and then in your build file, simply
+      declare the namespace on the <code>project</code> tag:
+
+      <pre>
+        &lt;project xmlns:s3="antlib:org.apache.ant.s3"&gt;
+      </pre>
+
+      ...and the types defined by this library will automatically be
+      available in the <code>s3</code> namespace.
+
+      It is planned to publish the artifact with dependency information such that
+      tools like Apache Ivy or Apache Maven can retrieve all required dependencies.
+    </p>
+
+    <h2>Supplied Tasks</h2>
+
+    <ul>
+      <li><a href="s3put.html">s3:put</a> - Put an Ant
+      <code>ResourceCollection</code> into an S3 bucket.</li>
+
+      <li><a href="s3delete.html">s3:delete</a> - Delete objects from an S3 bucket.
+      </li>
+    </ul>
+
+    <h2>Supplied Types</h2>
+
+    <ul>
+      <li><a href="s3client.html">s3:client</a> - Represents an instance
+      of the AWS SDK's <pre>AmazonS3</pre> client interface.</li>
+
+      <li><a href="s3object.html">s3:object</a> - Ant <code>Resource</code>
+      implementation representing a single S3 object.</li>
+
+      <li><a href="s3objects.html">s3:objects</a> - Ant
+      <code>ResourceCollection</code> collecting the objects located at a
+      particular bucket and prefix.</li>
+    </ul>
+
+    <h3>Custom resource comparators/selectors</h3>
+
+    A number of types are provided that implement both interfaces for use with
+    Ant's <code>sort</code> and <code>restrict</code> resource collections.
+    These are situated in a secondary Antlib namespace
+    <a href="s3compareselect.html"><code>org.apache.ant.s3cs</code></href>.
+
+    <hr/>
+  </body>
+</html>
diff --git a/docs/inlineproperties.html b/docs/inlineproperties.html
new file mode 100644
index 0000000..1f67ee9
--- /dev/null
+++ b/docs/inlineproperties.html
@@ -0,0 +1,36 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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
+
+https://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.
+-->
+<html>
+  <head>
+    <meta http-equiv="Content-Language" content="en-us"></meta>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <title>Inline Properties</title>
+  </head>
+
+  <body>
+    <h2><a name="inlineproperties">inlineproperties</a></h2>
+
+    <h3>Description</h3>
+
+    <p>Type to specify Java properties with XML. Element names are property keys
+    and their string values are the property values.</p>
+
+  </body>
+</html>
+
diff --git a/docs/s3client.html b/docs/s3client.html
new file mode 100644
index 0000000..fc242f3
--- /dev/null
+++ b/docs/s3client.html
@@ -0,0 +1,80 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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
+
+https://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.
+-->
+<html>
+  <head>
+    <meta http-equiv="Content-Language" content="en-us"></meta>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <title>S3 Client</title>
+  </head>
+
+  <body>
+    <h2><a name="s3client">s3:client</a></h2>
+
+    <h3>Description</h3>
+
+    <p>Declare an Amazon S3 client for use in the S3 Antlib.</p>
+
+    <h3>Parameters specified as nested elements</h3>
+
+    <h4>builder</h4>
+
+    <p>The builder element applies its XML configuration to an AWS SDK 2.x
+    <code>S3ClientBuilder</code>. Attributes are interpreted as simple
+    string-convertible properties, while elements are interpreted as nested
+    builders of the type specified by the method parameter.</p>
+
+    <h4>credentials</h4>
+
+    <p>The <code>credentials</code> element permits an easier mechanism
+    for specifying client credentials.</p>
+
+    <h5>Parameters</h5>
+    <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">accesskey</td>
+        <td valign="top">AWS Access key</td>
+        <td align="center">Yes, unless <code>profile</code> is specified</td>
+      </tr>
+      <tr>
+        <td valign="top">secretkey</td>
+        <td valign="top">AWS Secret key</td>
+        <td align="center">Yes, unless <code>profile</code> is specified</td>
+      </tr>
+      <tr>
+        <td valign="top">profile</td>
+        <td valign="top">AWS profile ID</td>
+        <td align="center">Yes, unless <code>@accesskey</code> and
+        <code>@secretkey</code> are specified
+        </td>
+      </tr>
+    </table>
+
+    <h4>http</h4>
+
+    <p><a href="inlineproperties.html">Inline properties</a> specifying
+    <code>SdkHttpConfigurationOption</code> constants</p>
+
+  </body>
+</html>
+
diff --git a/docs/s3compareselect.html b/docs/s3compareselect.html
new file mode 100644
index 0000000..fdac69f
--- /dev/null
+++ b/docs/s3compareselect.html
@@ -0,0 +1,35 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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
+
+https://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.
+-->
+<html>
+  <head>
+    <meta http-equiv="Content-Language" content="en-us"></meta>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <title>S3 Comparator/Selector library</title>
+  </head>
+
+  <body>
+    <h2>org.apache.ant.s3cs</h2>
+
+    <h3>Description</h3>
+
+    <p>Antlib defining a number of types which can act both as resource comparators and resource selectors.</p>
+    <p>TODO</p>
+
+  </body>
+</html>
diff --git a/docs/s3delete.html b/docs/s3delete.html
new file mode 100644
index 0000000..180ba88
--- /dev/null
+++ b/docs/s3delete.html
@@ -0,0 +1,82 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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
+
+https://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.
+-->
+<html>
+  <head>
+    <meta http-equiv="Content-Language" content="en-us"></meta>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <title>S3 Delete Task</title>
+  </head>
+
+  <body>
+    <h2><a name="s3delete">s3:delete</a></h2>
+
+    <h3>Description</h3>
+
+    <p>Delete the objects represented by a collection of
+    <a href="s3object.html">s3:object</a> resources.</p>
+
+    <h3>Parameters</h3>
+    <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">clientrefid</td>
+        <td valign="top">Ant reference ID to an <a href="s3client.html">s3:client</a>
+        defined elsewhere</td>
+        <td align="center">No, default <code>object</code></td>
+      </tr>
+      <tr>
+        <td valign="top">as</td>
+        <td valign="top">object precision: <code>object|version</code></td>
+        <td align="center">No, default <code>object</code></td>
+      </tr>
+      <tr>
+        <td valign="top">blocksize</td>
+        <td valign="top">Size of delete batches when operating in batch mode</td>
+        <td align="center">No, default 1000</td>
+      </tr>
+    </table>
+
+    <h3>Parameters specified as nested elements</h3>
+
+    <h4>s3:client</h4>
+
+    <p><a href="s3client.html">s3:client</a> to use for deletion. If a client is
+    specified either in this manner or by use of <code>@clientrefid</code>, the
+    <code>delete</code> operation is put into batch mode. If the collection of
+    <code>s3:object</code> resources come from an
+    <a href="s3objects.html">s3:objects</a> collection, and therefore already
+    have a reference to the client that discovered them, this task does not need
+    a client reference and each object will be requested to delete itself.
+    </p>
+
+    <h4>resource collection</h4>
+
+    <p>Any number of nested resource collections may be specified; however
+    resources other than <a href="s3object.html">s3:object</a> are ignored.
+    Further, if <code>@as</code> is <code>object</code> an <code>s3:object</code>
+    that is a delete marker will also be ignored, as it indicates the object
+    has already been deleted, so far as it goes.</p>
+
+  </body>
+</html>
+
diff --git a/docs/s3object.html b/docs/s3object.html
new file mode 100644
index 0000000..ee28c5c
--- /dev/null
+++ b/docs/s3object.html
@@ -0,0 +1,80 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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
+
+https://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.
+-->
+<html>
+  <head>
+    <meta http-equiv="Content-Language" content="en-us"></meta>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <title>S3 Object</title>
+  </head>
+
+  <body>
+    <h2><a name="s3object">s3:object</a></h2>
+
+    <h3>Description</h3>
+
+    <p>Ant resource representing an S3 object or object version (an object
+    version will ordinarily come from <a href="s3objects.html">s3:objects</a>).
+    Supports a client although in normal usage this is unnecessary.</p>
+
+    <h3>Parameters</h3>
+    <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">bucket</td>
+        <td valign="top">S3 bucket</td>
+        <td align="center">Yes</td>
+      </tr>
+      <tr>
+        <td valign="top">key</td>
+        <td valign="top">S3 key</td>
+        <td align="center">Yes</td>
+      </tr>
+      <tr>
+        <td valign="top">clientrefid</td>
+        <td valign="top">Ant reference ID of an <a href="s3client.html">s3:client</a>
+        defined elsewhere</td>
+        <td align="center">No</td>
+      </tr>
+      <tr>
+        <td valign="top">contenttype</td>
+        <td valign="top">MIME type of this resource</td>
+        <td align="center">No</td>
+      </tr>
+    </table>
+
+    <h3>Parameters specified as nested elements</h3>
+
+    <h4>client</h4>
+
+    <p><a href="s3client.html">s3:client</p>
+
+    <h4>metadata</h4>
+
+    <p><a href="inlineproperties.html">Inline properties specifying S3 object metadata</p>
+
+    <h4>tagging</h4>
+
+    <p><a href="inlineproperties.html">Inline properties specifying S3 object tagging</p>
+
+  </body>
+</html>
diff --git a/docs/s3objects.html b/docs/s3objects.html
new file mode 100644
index 0000000..76f74ed
--- /dev/null
+++ b/docs/s3objects.html
@@ -0,0 +1,122 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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
+
+https://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.
+-->
+<html>
+  <head>
+    <meta http-equiv="Content-Language" content="en-us"></meta>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <title>S3 Objects</title>
+  </head>
+
+  <body>
+    <h2><a name="s3objects">s3:objects</a></h2>
+
+    <h3>Description</h3>
+
+    <p>Ant resource collection of <a href="s3object.html">s3:object</a>
+    resources.</p>
+
+    <h3>Parameters</h3>
+    <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">bucket</td>
+        <td valign="top">S3 bucket</td>
+        <td align="center">Yes</td>
+      </tr>
+      <tr>
+        <td valign="top">delimiter</td>
+        <td valign="top">S3 delimiter</td>
+        <td align="center">No, default <code>/</code></td>
+      </tr>
+      <tr>
+        <td valign="top">cache</td>
+        <td valign="top">Whether to cache discovered resources</td>
+        <td align="center">No, default <code>true</code></td>
+      </tr>
+      <tr>
+        <td valign="top">casesensitive</td>
+        <td valign="top">Whether the resource search is performed in a case-sensitive manner</td>
+        <td align="center">No, default <code>true</code></td>
+      </tr>
+      <tr>
+        <td valign="top">as</td>
+        <td valign="top">object precision: <code>object|version</code></td>
+        <td align="center">No, default <code>object</code></td>
+      </tr>
+      <tr>
+        <td valign="top">includeprefixes</td>
+        <td valign="top">Whether to include s3 prefix objects as directory resources</td>
+        <td align="center">No, default <code>false</code></td>
+      </tr>
+      <tr>
+        <td valign="top">clientrefid</td>
+        <td valign="top">Ant reference ID of an <a href="s3client.html">s3:client</a>
+        defined elsewhere</td>
+        <td align="center">Yes, unless a nested <code>s3:client</code> is specified</td>
+      </tr>
+      <tr>
+        <td valign="top">includes</td>
+        <td valign="top">comma-delimited include patterns</td>
+        <td align="center">No</td>
+      </tr>
+      <tr>
+        <td valign="top">includesfile</td>
+        <td valign="top">file containing line-delimited include patterns</td>
+        <td align="center">No</td>
+      </tr>
+      <tr>
+        <td valign="top">excludes</td>
+        <td valign="top">comma-delimited exclude patterns</td>
+        <td align="center">No</td>
+      </tr>
+      <tr>
+        <td valign="top">excludesfile</td>
+        <td valign="top">file containing line-delimited exclude patterns</td>
+        <td align="center">No</td>
+      </tr>
+    </table>
+
+    <h3>Parameters specified as nested elements</h3>
+
+    <h4>client</h4>
+
+    <p><a href="s3client.html">s3:client</p>
+
+    <h4>patternset</h4>
+
+    <p>Any number of nested <code>patternset</code>s are permitted.</p>
+
+    <h4>include</h4>
+
+    <p>Any number of nested <code>include</code> elements are permitted.</p>
+
+    <h4>exclude</h4>
+
+    <p>Any number of nested <code>exclude</code> elements are permitted.</p>
+
+    <h4>selector</h4>
+
+    <p>Any number of nested resource selectors are permitted and applied in <code>OR</code> fashion.</p>
+
+  </body>
+</html>
diff --git a/docs/s3put.html b/docs/s3put.html
new file mode 100644
index 0000000..a8f10aa
--- /dev/null
+++ b/docs/s3put.html
@@ -0,0 +1,96 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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
+
+https://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.
+-->
+<html>
+  <head>
+    <meta http-equiv="Content-Language" content="en-us"></meta>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <title>S3 Put Task</title>
+  </head>
+
+  <body>
+    <h2><a name="s3put">s3:put</a></h2>
+
+    <h3>Description</h3>
+
+    <p>Puts nested resources into an S3 bucket.</p>
+
+    <h3>Parameters</h3>
+    <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">bucket</td>
+        <td valign="top">destination bucket</td>
+        <td align="center">Yes</td>
+      </tr>
+      <tr>
+        <td valign="top">clientrefid</td>
+        <td valign="top">Ant reference ID of an <a href="s3client.html">s3:client</a>
+        defined elsewhere</td>
+        <td align="center">Yes, unless a nested <code>s3:client</code> is specified</td>
+      </tr>
+      <tr>
+        <td valign="top">enablemultiplemappings</td>
+        <td valign="top">Enable multiple destinations generated from nested mapper elements</td>
+        <td align="center">No, default <code>false</code></td>
+      </tr>
+      <tr>
+        <td valign="top">filtering</td>
+        <td valign="top">Whether to apply global Ant filters</td>
+        <td align="center">No, default <code>false</code></td>
+      </tr>
+      <tr>
+        <td valign="top">inputencoding</td>
+        <td valign="top">Input encoding</td>
+        <td align="center">No</td>
+      </tr>
+      <tr>
+        <td valign="top">outputencoding</td>
+        <td valign="top">Output encoding</td>
+        <td align="center">No</td>
+      </tr>
+    </table>
+
+    <h3>Parameters specified as nested elements</h3>
+
+    <h4>resource collection</h4>
+
+    <p>Any number of nested resource collections are accepted.</p>
+
+    <h4>FilterSet</h4>
+
+    <p>Any number of nested filtersets are accepted.</p>
+
+    <h4>FilterChain</h4>
+
+    <p>Any number of nested filterchains are accepted.</p>
+
+    <h4>Mapper</h4>
+
+    <p>Any number of nested mapper elements are accepted.</p>
+
+    <h4>FileNameMapper</h4>
+
+    <p>Any number of type defined mappers are accepted.</p>
+
+  </body>
+</html>
diff --git a/docs/style.css b/docs/style.css
new file mode 100644
index 0000000..a09991e
--- /dev/null
+++ b/docs/style.css
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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
+ *
+ * https://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.
+ */
+h2 {
+  font-size: 200%;
+  background-color: ffffff;
+}
+
+h3 {
+  font-size: 130%;
+  color:     #ffffff;
+  background-color: #525D76;
+}
+
+h4 {
+  color:  #ffffff;
+  background-color: #828DA6;
+}
+
+td {
+   background-color: eeeeee;
+   color:            000000;
+}
+
+ /* first row */
+table tr:first-child td {
+   background-color: cccccc;
+   color:            000000;
+}
+
+ /* or th as first row */
+table th {
+   background-color: cccccc;
+   color:            000000;
+}
+
+pre {
+   background-color: efefef;
+}
+
+.copyright {
+    font-family: arial,helvetica,sanserif;
+    font-size: 90%;
+    clear: both;
+    text-align: center;
+    margin: 0px;
+    border-top: thin solid #4C6C8F;
+}

[ant-antlibs-s3] 02/03: support Duration

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mbenson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ant-antlibs-s3.git

commit b81ff5a078ccd05d1c1b67d4621fb64ec428b0b4
Author: Matt Benson <mb...@apache.org>
AuthorDate: Thu Mar 10 16:13:21 2022 -0600

    support Duration
---
 src/main/org/apache/ant/s3/StringConversions.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/org/apache/ant/s3/StringConversions.java b/src/main/org/apache/ant/s3/StringConversions.java
index 0dd23b9..7705e85 100644
--- a/src/main/org/apache/ant/s3/StringConversions.java
+++ b/src/main/org/apache/ant/s3/StringConversions.java
@@ -22,6 +22,7 @@ import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
 import java.lang.reflect.TypeVariable;
+import java.time.Duration;
 import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.Locale;
@@ -70,6 +71,7 @@ class StringConversions {
         cnv.put(Boolean.class, Boolean::valueOf);
         cnv.put(String.class, Function.identity());
         cnv.put(Region.class, Region::of);
+        cnv.put(Duration.class, Duration::parse);
         CONVERTERS = Collections.unmodifiableMap(cnv);
     }