ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1170613 - in /ant/antlibs/compress/trunk: changes.xml docs/compresource.html docs/index.html docs/pack.html docs/unpack.html
Date Wed, 14 Sep 2011 13:35:29 GMT
Author: bodewig
Date: Wed Sep 14 13:35:29 2011
New Revision: 1170613

URL: http://svn.apache.org/viewvc?rev=1170613&view=rev
Log:
Document pack200 tasks

Modified:
    ant/antlibs/compress/trunk/changes.xml
    ant/antlibs/compress/trunk/docs/compresource.html
    ant/antlibs/compress/trunk/docs/index.html
    ant/antlibs/compress/trunk/docs/pack.html
    ant/antlibs/compress/trunk/docs/unpack.html

Modified: ant/antlibs/compress/trunk/changes.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/changes.xml?rev=1170613&r1=1170612&r2=1170613&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/changes.xml (original)
+++ ant/antlibs/compress/trunk/changes.xml Wed Sep 14 13:35:29 2011
@@ -45,6 +45,9 @@
         extensions.
       </action>
       <action type="add">
+        Support for pack200 compression has been added.
+      </action>
+      <action type="add">
         Read-only support for the Unix dump format has been added in
         the form of an &lt;undump&gt; task and corresponding
         &lt;dumpentry&gt; and &lt;dumpfileset&gt; resources.

Modified: ant/antlibs/compress/trunk/docs/compresource.html
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/docs/compresource.html?rev=1170613&r1=1170612&r2=1170613&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/docs/compresource.html (original)
+++ ant/antlibs/compress/trunk/docs/compresource.html Wed Sep 14 13:35:29 2011
@@ -71,3 +71,24 @@
   some-archive.tar.gz where the <code>gzipresource</code> provides
   the decompression of the archive.</p>
 
+<h2><a name="pack200resource">pack200resource</a></h2>
+
+<p>This is a <a href="#compresource">compressed resource</a> using the
+  <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/jar/Pack200.html">Pack200</a>
+  compression.</p>
+
+<h4>Examples</h4>
+
+<pre>
+&lt;cmp:zipentry xmlns:cmp="antlib:org.apache.ant.compress"
+    name="SomeFile.class"&gt;
+  &lt;cmp:pack200resource&gt;
+    &lt;file file="some-archive.pack"/&gt;
+  &lt;/cmp:pack200resource&gt;
+&lt;/cmp:zipentry&gt;
+</pre>
+
+<p>Represents the entry named Somefile.class in the Pack200 compressed
+  JAR some-archive.pack where the <code>pack200resource</code>
+  provides the decompression of the archive.</p>
+

Modified: ant/antlibs/compress/trunk/docs/index.html
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/docs/index.html?rev=1170613&r1=1170612&r2=1170613&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/docs/index.html (original)
+++ ant/antlibs/compress/trunk/docs/index.html Wed Sep 14 13:35:29 2011
@@ -29,7 +29,7 @@
       compression/uncompression and archival/unarchival capabilities
       based on <a href="http://commons.apache.org/compress/">Apache
       Commons Compress</a>.  Using Apache Commons Compress 1.3 this
-      Antlib supports gzip and bzip2 compression and ar, cpio, Unix
+      Antlib supports gzip, bzip2 and pack200 compression and ar, cpio, Unix
       dump, tar and zip archives.  Support for dump is read-only.</p>
 
     <h3>Known Limitations</h3>
@@ -49,10 +49,12 @@
       <li><a href="archive.html#cpio">cpio</a></li>
       <li><a href="unpack.html#gunzip">gunzip</a></li>
       <li><a href="pack.html#gzip">gzip</a></li>
+      <li><a href="pack.html#pack200">pack200</a></li>
       <li><a href="archive.html#tar">tar</a></li>
       <li><a href="expand.html#unar">unar</a></li>
       <li><a href="expand.html#uncpio">uncpio</a></li>
       <li><a href="expand.html#undump">undump</a></li>
+      <li><a href="unpack.html#unpack200">unpack200</a></li>
       <li><a href="expand.html#untar">untar</a></li>
       <li><a href="expand.html#unzip">unzip</a></li>
       <li><a href="archive.html#zip">zip</a></li>
@@ -70,6 +72,7 @@
       <li><a href="entry.html#dumpentry">dumpentry</a></li>
       <li><a href="fileset.html#dumpfileset">dumpfileset</a></li>
       <li><a href="compresource.html#gzipresource">gzipresource</a></li>
+      <li><a href="compresource.html#pack200resource">pack200resource</a></li>
       <li><a href="entry.html#tarentry">tarentry</a></li>
       <li><a href="fileset.html#tarfileset">tarfileset</a></li>
       <li><a href="entry.html#zipentry">zipentry</a></li>

Modified: ant/antlibs/compress/trunk/docs/pack.html
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/docs/pack.html?rev=1170613&r1=1170612&r2=1170613&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/docs/pack.html (original)
+++ ant/antlibs/compress/trunk/docs/pack.html Wed Sep 14 13:35:29 2011
@@ -76,6 +76,15 @@
   <p>You must not specify the archiving task's dest attribute or
     nested element.</p>
 
+  <h4>any <a href="#pack">compressing task</a></h4>
+
+  <p><em>Since Compress Antlib 1.1</em>
+
+  <p>The task's output will be used as src.</p>
+
+  <p>You must not specify the compressing task's dest attribute or
+    nested element.</p>
+
   <h4>dest</h4>
 
   <p>Accepts
@@ -86,14 +95,72 @@
 
   <h3><a name="bzip2">BZip2</a></h3>
 
-  <p>Is an <a href="#pack">compressing task</a> that uses the BZIP2
+  <p>Is a <a href="#pack">compressing task</a> that uses the BZIP2
     compression algorithm.</p>
 
   <h3><a name="gzip">GZip</a></h3>
 
-  <p>Is an <a href="#pack">compressing task</a> that uses the GZIP
+  <p>Is a <a href="#pack">compressing task</a> that uses the GZIP
     compression algorithm.</p>
 
+  <h3><a name="pack200">Pack200</a></h3>
+
+  <p>Is a <a href="#pack">compressing task</a> that uses
+    the <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/jar/Pack200.html">Pack200</a>
+    compression algorithm.</p>
+
+  <p>The source of this task must be a valid JAR archive.</p>
+
+  <p>The created archive will not be compressed, use
+    another <code>&lt;gzip&gt;</code> task to create
+    a <code>pack.gz</code> archive.</p>
+
+  <h4>Parameters</h4>
+  <p>In addition to the attributes supported by all compressing task
+    this task also supports.</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">pack200strategy</td>
+      <td valign="top">Apache Commons Compress' Pack200 streams cache
+        the archive data either in memory or in a temporary file.
+        User this attribute to control which strategy is chosen.
+        Valid values are "in-memory" and "temp-file".</td>
+      <td align="center" valign="top">No, defaults to in-memory.</td>
+    </tr>
+  </table>
+
+  <h4>Parameters specified as nested elements</h4>
+  <p>In addition to the nested elements supported by all compressing task
+    this task also supports.</p>
+
+  <h5>property</h5>
+
+  <p>Sets a property for the packer/unpacker (see the Pack200 javadocs
+    for details).</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">key</td>
+      <td valign="top">Name of the property.</td>
+      <td align="center" valign="top">Yes.</td>
+    </tr>
+    <tr>
+      <td valign="top">value</td>
+      <td valign="top">Value of the property.</td>
+      <td align="center" valign="top">Yes.</td>
+    </tr>
+  </table>
+
   <h3>Examples</h3>
   <pre>
     &lt;cmp:gzip src=&quot;test.tar&quot; dest=&quot;test.tar.gz&quot;
@@ -126,5 +193,28 @@
     compresses it using GZIP and stores it in the
     file <i>src.tar.gz</i> in the project's basedir.</p>
 
+  <pre>
+    &lt;cmp:pack200 dest="foo.pack"
+                 xmlns:cmp="antlib:org.apache.ant.compress"
+                 src="foo.jar"&gt;
+      &lt;property key="pack.effort" value="9"/&gt;
+    &lt;/cmp:pack200&gt;
+  </pre>
+  <p>Packs <i>foo.jar</i> trying to prepare for better compression
+    results by using above than normal effort.</p>
+
+  <pre>
+    &lt;cmp:gzip xmlns:cmp="antlib:org.apache.ant.compress"&gt;
+      &lt;cmp:pack200&gt;
+        &lt;file file=&quot;foo.jar&quot;/&gt;
+      &lt;/cmp:pack200&gt;
+      &lt;dest&gt;
+        &lt;file file=&quot;foo.pack.gz&quot;/&gt;
+      &lt;/dest&gt;
+    &lt;/cmp:gzip&gt;
+</pre>
+  <p>Creates a deflated Pack200 archive of <i>foo.jar</i>and stores it
+    in the file <i>foo.pack.gz</i> in the project's basedir.</p>
+
 </body>
 </html>

Modified: ant/antlibs/compress/trunk/docs/unpack.html
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/docs/unpack.html?rev=1170613&r1=1170612&r2=1170613&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/docs/unpack.html (original)
+++ ant/antlibs/compress/trunk/docs/unpack.html Wed Sep 14 13:35:29 2011
@@ -75,6 +75,62 @@ resource collection</h4>
 <p>Is an <a href="#unpack">uncompressing task</a> that uses the GZIP
   compression algorithm.</p>
 
+<h3><a name="unpack200">Unpack200</a></h3>
+
+<p>Is an <a href="#unpack">uncompressing task</a> that uses
+  the <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/jar/Pack200.html">Pack200</a>
+  compression algorithm.</p>
+
+<p>This task does not work on defalted archives, you need to wrap
+  defalted archives into <code>gunzipresource</code>s in order to use
+  them.
+
+  <h4>Parameters</h4>
+  <p>In addition to the attributes supported by all uncompressing task
+    this task also supports.</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">pack200strategy</td>
+      <td valign="top">Apache Commons Compress' Pack200 streams cache
+        the archive data either in memory or in a temporary file.
+        User this attribute to control which strategy is chosen.
+        Valid values are "in-memory" and "temp-file".</td>
+      <td align="center" valign="top">No, defaults to in-memory.</td>
+    </tr>
+  </table>
+
+  <h4>Parameters specified as nested elements</h4>
+  <p>In addition to the nested elements supported by all uncompressing task
+    this task also supports.</p>
+
+  <h5>property</h5>
+
+  <p>Sets a property for the unpacker (see the Pack200 javadocs for
+    details).</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">key</td>
+      <td valign="top">Name of the property.</td>
+      <td align="center" valign="top">Yes.</td>
+    </tr>
+    <tr>
+      <td valign="top">value</td>
+      <td valign="top">Value of the property.</td>
+      <td align="center" valign="top">Yes.</td>
+    </tr>
+  </table>
+
 <h3>Examples</h3>
 <blockquote><pre>
 &lt;cmp:gunzip src=&quot;test.tar.gz&quot; xmlns:cmp="antlib:org.apache.ant.compress"/&gt;
@@ -100,6 +156,15 @@ subdir is a directory).</p>
 </pre></blockquote>
 <p>downloads <i>http://example.org/archive.tar.gz</i> and expands it
 to <i>archive.tar</i> in the project's basedir on the fly.</p>
+<blockquote><pre>
+&lt;cmp:unpack200 dest=&quot;foo.jar&quot; xmlns:cmp="antlib:org.apache.ant.compress"&gt;
+  &lt;cmp:gzipresource&gt;
+    &lt;file file="foo.pack.gz"/&gt;
+  &lt;/cmp:gzipresource&gt;
+&lt;/cmp:unpack200&gt;
+</pre></blockquote>
+<p>Unpacks the deflated Pack200 archive <i>foo.pack.gz</i> and stores
+  it as <i>foo.jar</i>.</p>
 
 <h3>Related tasks</h3>
 



Mime
View raw message