[jira] [Created] (FELIX-3268) Cannot build webconsole and webconsole-plugins with JDK 7

2011-12-13 Thread Lionel Debroux (Created) (JIRA)
Cannot build webconsole and webconsole-plugins with JDK 7
-

 Key: FELIX-3268
 URL: https://issues.apache.org/jira/browse/FELIX-3268
 Project: Felix
  Issue Type: Bug
  Components: Web Console
 Environment: Debian unstable x86_64, JDK 7 from 
http://jdk7.java.net/download.html, Maven 3.0.3
Reporter: Lionel Debroux


A search in JIRA returned no match for "native2ascii" and no relevant match for 
"native", so I'm creating an issue.

When trying to build Felix SVN HEAD with JDK 7, the build process stops when it 
fails to invoke native2ascii in webconsole.
It seems that there was a change between JDK 6 and JDK 7, and the 1.0-alpha-1 
version of org.codehaus.mojo:native2ascii-maven-plugin in multiple POMs cannot 
handle it. However, version 1.0-beta-1 (I obtained that version number by 
removing the "version" parameter entirely) can cope with JDK 7.
The patch below fixes the build problem in webconsole & webconsole-plugins:

diff --git a/webconsole-plugins/deppack/pom.xml 
b/webconsole-plugins/deppack/pom.xml
index 0c764e6..e576a57 100644
--- a/webconsole-plugins/deppack/pom.xml
+++ b/webconsole-plugins/deppack/pom.xml
@@ -40,7 +40,7 @@

org.codehaus.mojo

native2ascii-maven-plugin
-   1.0-alpha-1
+   1.0-beta-1



diff --git a/webconsole-plugins/ds/pom.xml b/webconsole-plugins/ds/pom.xml
index 40a3224..338f306 100644
--- a/webconsole-plugins/ds/pom.xml
+++ b/webconsole-plugins/ds/pom.xml
@@ -40,7 +40,7 @@
 
 org.codehaus.mojo
 native2ascii-maven-plugin
-1.0-alpha-1
+1.0-beta-1
 
 
 
diff --git a/webconsole-plugins/event/pom.xml b/webconsole-plugins/event/pom.xml
index b257032..2375eab 100644
--- a/webconsole-plugins/event/pom.xml
+++ b/webconsole-plugins/event/pom.xml
@@ -48,7 +48,7 @@
 
 org.codehaus.mojo
 native2ascii-maven-plugin
-1.0-alpha-1
+1.0-beta-1
 
 
 
diff --git a/webconsole-plugins/obr/pom.xml b/webconsole-plugins/obr/pom.xml
index c4a88f2..3854ca3 100644
--- a/webconsole-plugins/obr/pom.xml
+++ b/webconsole-plugins/obr/pom.xml
@@ -40,7 +40,7 @@

org.codehaus.mojo

native2ascii-maven-plugin
-   1.0-alpha-1
+   1.0-beta-1



diff --git a/webconsole-plugins/shell/pom.xml b/webconsole-plugins/shell/pom.xml
index 661d3cd..7f1b428 100644
--- a/webconsole-plugins/shell/pom.xml
+++ b/webconsole-plugins/shell/pom.xml
@@ -40,7 +40,7 @@

org.codehaus.mojo

native2ascii-maven-plugin
-   1.0-alpha-1
+   1.0-beta-1



diff --git a/webconsole-plugins/upnp/pom.xml b/webconsole-plugins/upnp/pom.xml
index 413da08..bb091a4 100644
--- a/webconsole-plugins/upnp/pom.xml
+++ b/webconsole-plugins/upnp/pom.xml
@@ -48,7 +48,7 @@
 
 org.codehaus.mojo
 native2ascii-maven-plugin
-1.0-alpha-1
+1.0-beta-1
 
 
 
diff --git a/webconsole/pom.xml b/webconsole/pom.xml
index bf4e1cb..b9f0db2 100644
--- a/webconsole/pom.xml
+++ b/webconsole/pom.xml
@@ -69,7 +69,7 @@
 
 org.codehaus.mojo
 native2ascii-maven-plugin
-1.0-alpha-1
+1.0-beta-1
 
 
 


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (FELIX-3191) OBR cannot install JARs which have been encoded for transfer

2011-10-27 Thread Lionel Debroux (Created) (JIRA)
OBR cannot install JARs which have been encoded for transfer


 Key: FELIX-3191
 URL: https://issues.apache.org/jira/browse/FELIX-3191
 Project: Felix
  Issue Type: Bug
  Components: Bundle Repository (OBR)
 Environment: Debian Testing, 64-bit
Reporter: Lionel Debroux


I recently had trouble installing bundles through the OBR: the JAR handling 
code would spit errors about not being able to open the ZIP file.
With Wireshark, I tracked the problem down to the JAR file having been gzipped, 
but not having been uncompressed on the computer side.

Even if they're not explicitly asked for it (which is the case when downloading 
a bundle through the OBR), servers are allowed by the HTTP/1.1 spec to return 
encoded content:
"If no Accept-Encoding field is present in a request, the server MAY assume 
that the client will accept any content coding."
( http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3 )

I worked around the problem the following way:

Index: 
bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/FileUtil.java
===
--- 
bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/FileUtil.java
(revision 1189686)
+++ 
bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/FileUtil.java
(working copy)
@@ -204,6 +204,14 @@
 // Do it the manual way to have a chance to
 // set request properties as proxy auth (EW).
 setProxyAuth(conn);
+
+// Force identity encoding
+if ("http".equals(conn.getURL().getProtocol())
+|| "https".equals(conn.getURL().getProtocol()))
+{
+conn.setRequestProperty("Accept-Encoding", "");
+}
+
 try
 {
 return conn.getInputStream();

But I'm not sure whether that this is a proper fix, which is why I had posted 
it to felix-users :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira