svn commit: r951772 - in /ant/ivy/core/trunk: ./ src/java/org/apache/ivy/util/url/ test/java/org/apache/ivy/util/url/

2010-06-05 Thread maartenc
Author: maartenc
Date: Sat Jun  5 21:25:26 2010
New Revision: 951772

URL: http://svn.apache.org/viewvc?rev=951772&view=rev
Log:
IMPROVEMENT: added support for 'deflate' HTTP Content-Encoding (IVY-1194)

Modified:
ant/ivy/core/trunk/CHANGES.txt
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/AbstractURLHandler.java
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/BasicURLHandler.java
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java

ant/ivy/core/trunk/test/java/org/apache/ivy/util/url/BasicURLHandlerTest.java

ant/ivy/core/trunk/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=951772&r1=951771&r2=951772&view=diff
==
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Sat Jun  5 21:25:26 2010
@@ -115,7 +115,7 @@ for detailed view of each issue, please 
 - NEW: Support ivy.xml parent mechanism (IVY-742) (thanks to Jason Trump and 
Jean-Louis Boudart)
 - NEW: Make ivy.xml  available (IVY-1158)
 
-- IMPROVEMENT: added support for 'gzip' HTTP Content-Encoding (IVY-1194)
+- IMPROVEMENT: added support for 'gzip' and 'deflate' HTTP Content-Encoding 
(IVY-1194)
 - IMPROVEMENT: retrieve doesn't retrive files if the current one is more 
recent (IVY-1044)
 - IMPROVEMENT: better diagnostics when reporting bad ivy file in cache 
(IVY-1190)
 - IMPROVEMENT: Support changing="true" for inline retrieve (IVY-1180)

Modified: 
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/AbstractURLHandler.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/AbstractURLHandler.java?rev=951772&r1=951771&r2=951772&view=diff
==
--- ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/AbstractURLHandler.java 
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/AbstractURLHandler.java 
Sat Jun  5 21:25:26 2010
@@ -17,13 +17,19 @@
  */
 package org.apache.ivy.util.url;
 
+import java.io.BufferedInputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.regex.Pattern;
+import java.util.zip.DataFormatException;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.Inflater;
+import java.util.zip.InflaterInputStream;
 
 public abstract class AbstractURLHandler implements URLHandler {
 
@@ -118,4 +124,44 @@ public abstract class AbstractURLHandler
 
 return new URL(normalizeToString(url));
 }
+
+protected InputStream getDecodingInputStream(String encoding, InputStream 
in) 
+throws IOException {
+InputStream result = null;
+
+if ("gzip".equals(encoding)) {
+result = new GZIPInputStream(in);
+} else if ("deflate".equals(encoding)) {
+// There seems to be 2 variants of the "deflate"-encoding.
+// I couldn't find a way to auto-detect which variant was
+// used, so as (a not really good) work-around we try do
+// decompress the first 100 bytes using the "zlib"-variant.
+BufferedInputStream bStream = new BufferedInputStream(in);
+bStream.mark(100);
+byte[] bytes = new byte[100];
+int nbBytes = bStream.read(bytes);
+bStream.reset();
+
+Inflater inflater = new Inflater();
+inflater.setInput(bytes, 0, nbBytes);
+try {
+inflater.inflate(new byte[1000]);
+
+// no error decompressing the first 100 bytes, so we
+// assume the "zlib"-variant was used.
+result = new InflaterInputStream(bStream);
+} catch (DataFormatException e) {
+// there was an error decompressing the first 100 bytes,
+// so we assume the "gzip/raw"-variant was used.
+result = new InflaterInputStream(bStream, new Inflater(true));
+} finally {
+inflater.end();
+}
+} else {
+result = in;
+}
+
+return result;
+}
+
 }

Modified: 
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/BasicURLHandler.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/BasicURLHandler.java?rev=951772&r1=951771&r2=951772&view=diff
==
--- ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/BasicURLHandler.java 
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/BasicURLHandler.java 
Sat Jun  5 21:25:26 2010
@@ -28,7 +28,6 @@ 

svn commit: r951749 - /ant/core/trunk/docs/manual/install.html

2010-06-05 Thread bruce
Author: bruce
Date: Sat Jun  5 18:48:48 2010
New Revision: 951749

URL: http://svn.apache.org/viewvc?rev=951749&view=rev
Log:
Clarify some instructions, remove netrexx and jai as manual download examples

Modified:
ant/core/trunk/docs/manual/install.html

Modified: ant/core/trunk/docs/manual/install.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/install.html?rev=951749&r1=951748&r2=951749&view=diff
==
--- ant/core/trunk/docs/manual/install.html (original)
+++ ant/core/trunk/docs/manual/install.html Sat Jun  5 18:48:48 2010
@@ -27,7 +27,7 @@
 Getting Ant
 
 The Short Story
-To get up and running with Ant quickly, follow these steps:
+To get up and running with the binary edition of Ant quickly, follow these 
steps:
 
 Make sure you have a Java environment installed, See System
 Requirements for details.
@@ -36,13 +36,18 @@ Requirements for details.
 Set environmental variables JAVA_HOME to your Java 
environment, ANT_HOME to
 the directory you uncompressed Ant to, and add ${ANT_HOME}/bin 
(Unix) or
 %ANT_HOME%/bin (Windows) to your PATH. See Setup for details.
-Optionally, run ant -f fetch.xml -Ddest=system to get the 
library dependencies
-of most of the Ant optional tasks. If you don't do this, many of the optional 
Ant tasks will not be available. See Optional 
Tasks for
-details and other options for the -Ddest parameter.
+Optionally, from the ANT_HOME directory run ant -f 
fetch.xml -Ddest=system to get
+the library dependencies of most of the Ant tasks that require them. If you 
don't do this, many of the dependent
+Ant tasks will not be available. See Optional 
Tasks for details and other options
+for the -Ddest parameter.
 Optionally, add any desired Antlibs. See http://ant.apache.org/antlibs/proper.html"; target="_top">Ant 
Libraries for a list.
 
 
-The short story for working with the Ant source code is:
+
+Note that the links in the list above will give more details about each of the 
steps,
+should you need them. Or you can just continue reading the rest of this 
document.
+
+The short story for working with the Ant source code (not needed if you are 
working with the binary edition) is:
 
 Get the source code. See Source Edition for 
details.
  Build Ant. See Building Ant for details.
@@ -459,9 +464,9 @@ libraries must be added to Ant's classpa
 
 
 
-Note that not all dependencies are gathered using fetch.xml. For 
example, netrexx.jar and jai.jar
-require you to manually download the files. See Library Dependencies.for the
-URLs where you can get these files.
+Note that not all dependencies are gathered using fetch.xml. 
Tasks that depend on
+commercial software, in particular, will require you to have the commercial 
software installed
+in order to be used.
 
 
 The Apache Ant Project also provides additional tasks and types that are 
available as separately




[g...@vmgump]: Project test-ant (in module ant) failed

2010-06-05 Thread Gump Integration Build
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project test-ant has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 12 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- test-ant :  Java based build tool


Full details are available at:
http://vmgump.apache.org/gump/public/ant/test-ant/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Failed with reason build failed



The following work was performed:
http://vmgump.apache.org/gump/public/ant/test-ant/gump_work/build_ant_test-ant.html
Work Name: build_ant_test-ant (Type: Build)
Work ended in a state of : Failed
Elapsed: 18 mins 32 secs
Command Line: /usr/lib/jvm/java-6-sun/bin/java -Djava.awt.headless=true 
-Xbootclasspath/p:/srv/gump/public/workspace/xml-xerces2/build/xercesImpl.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar:/srv/gump/public/workspace/xml-xalan/build/serializer.jar:/srv/gump/public/workspace/xml-xalan/build/xalan-unbundled.jar
 org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only -Dtest.haltonfailure=false 
-Dant.home=/srv/gump/public/workspace/ant/dist run-tests 
[Working Directory: /srv/gump/public/workspace/ant]
CLASSPATH: 
/usr/lib/jvm/java-6-sun/lib/tools.jar:/srv/gump/public/workspace/ant/build/testcases:/srv/gump/public/workspace/ant/src/tests/junit:/srv/gump/public/workspace/ant/src/etc/testcases:/srv/gump/public/workspace/ant/src/etc/testcases/taskdefs/optional/out:/srv/gump/public/workspace/ant/build/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/ant/build/lib/ant-swing.jar:/srv/gump/public/workspace/ant/build/lib/ant-junit.jar:/srv/gump/public/workspace/ant/build/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/build/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/build/lib/ant-javamail.jar:/srv/gump/public/workspace/ant/build/lib/ant-apache-bcel.jar:/srv/gump/public/workspace/ant/build/lib/ant-apache-regexp.jar:/srv/gump/public/workspace/ant/build/lib/ant-commons-net.jar:/srv/gump/public/workspace/ant/build/lib/ant-jsch.jar:/srv/gump/public/workspace/ant/build/lib/ant-apache-log4j.jar:/srv/gump/public/workspace/ant/build/lib/ant-antlr.jar:/srv/gump/public/works
 
pace/ant/build/lib/ant-commons-logging.jar:/srv/gump/public/workspace/ant/build/lib/ant-jdepend.jar:/srv/gump/public/workspace/ant/build/lib/ant-apache-bsf.jar:/srv/gump/public/workspace/ant/build/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/build/lib/ant-apache-oro.jar:/srv/gump/public/workspace/ant/build/lib/ant.jar:/srv/gump/public/workspace/ant/build/lib/ant-jai.jar:/srv/gump/packages/antlr/antlr-3.1.3.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-05062010.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-05062010.jar:/srv/gump/public/workspace/apache-commons/net/target/commons-net-1.5.0.jar:/srv/gump/packages/jaf-1.1ea/activation.jar:/srv/gump/public/workspace/jakarta-bcel/target/bcel-5.3-SNAPSHOT.jar:/srv/gump/public/workspace/jakarta-bsf/build/lib/bsf.jar:/srv/gump/public/workspace/logging-log4j-12/dist/lib/log4j-05062010.jar:/srv/gump/public/workspace/jakarta-oro/jakarta-oro-05062010.jar:/srv/gump/p
 
ublic/workspace/jakarta-regexp/build/jakarta-regexp-05062010.jar:/srv/gump/public/workspace/jakarta-servletapi-4/lib/servlet.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jdepend-2.6/lib/jdepend.jar:/srv/gump/packages/jsch/jsch-0.1.38.jar:/srv/gump/public/workspace/ant-antlibs/antunit/build/ant-antunit-05062010.jar:/srv/gump/public/workspace/junit/dist/junit-05062010.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar:/srv/gump/public/workspace/jakarta-tomcat-4.0/dist/common/lib/jasper-compiler.jar:/srv/gump/public/workspace/jakarta-tomcat-4.0/dist/common/lib/jasper-runtime.jar:/srv/gump/public/workspace/xml-commons/java/build/which.jar:/srv/gump/public/workspace/rhino/build/rhino_05062010/js.jar:/srv/gump/packages/bsh-2.0b4/bsh-commands-2.0b4.jar:/srv/gump/packages/bsh-2.0b4/bsh-classpath-2.0b4.jar:/srv/gump/packages/bsh-2.0b4/bsh-core-2.0b4.jar:/srv/gump/packages/bsh-2.0b4/bsh-bsf
 
-2.0b4.jar:/srv/gump/packages/bsh-2.0b4/bsh-2.0b4.jar:/srv/gump/packages/bsh-2.0b4/bsh-reflect-2.0b4.jar:/srv/gump/packages/bsh-2.0b4/bsh-util-2.0b4.jar:/srv/gump/public/workspace/apache-commons/codec/dist/commons-codec-05062010.jar
-
[au:antunit] Target: testStringTokenizer took 0.001 sec
[au:antunit] Target: testExplicitLines took 0.002 sec
[au:a

DO NOT REPLY [Bug 49356] javac task is ignoring source and target

2010-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49356

J.M. (Martijn) Kruithof  changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 49380] The org.apache.tools.ant.launch package is empty!

2010-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49380

J.M. (Martijn) Kruithof  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #2 from J.M. (Martijn) Kruithof  2010-06-05 
03:23:18 EDT ---
as indicated by submitter these are in ant-launcher.jar

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.