[jackrabbit] rebuilt with tomcat-servlet-3.0-api support

gil gil at fedoraproject.org
Fri Mar 1 08:12:01 UTC 2013


commit 871531298c35f3da10a8f75da8aa187534de41b0
Author: gil <puntogil at libero.it>
Date:   Fri Mar 1 09:11:50 2013 +0100

    rebuilt with tomcat-servlet-3.0-api support

 jackrabbit-2.4.2-servlet30.patch |  184 ++++++++++++++++++++++++++++++++++++++
 jackrabbit.spec                  |   17 +++-
 2 files changed, 196 insertions(+), 5 deletions(-)
---
diff --git a/jackrabbit-2.4.2-servlet30.patch b/jackrabbit-2.4.2-servlet30.patch
new file mode 100644
index 0000000..df02242
--- /dev/null
+++ b/jackrabbit-2.4.2-servlet30.patch
@@ -0,0 +1,184 @@
+diff -Nru jackrabbit-2.4.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java jackrabbit-2.4.2-gil/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
+--- jackrabbit-2.4.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java	2013-03-01 09:00:57.563812924 +0100
++++ jackrabbit-2.4.2-gil/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java	2013-03-01 09:00:23.354704832 +0100
+@@ -21,21 +21,31 @@
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.UnsupportedEncodingException;
++import java.lang.IllegalStateException;
+ import java.net.URI;
+ import java.net.URISyntaxException;
+ import java.security.Principal;
+ import java.util.ArrayList;
++import java.util.Collection;
+ import java.util.Enumeration;
+ import java.util.Iterator;
+ import java.util.List;
+ import java.util.Locale;
+ import java.util.Map;
+ 
++import javax.servlet.AsyncContext;
++import javax.servlet.DispatcherType;
+ import javax.servlet.RequestDispatcher;
++import javax.servlet.ServletContext;
++import javax.servlet.ServletException;
+ import javax.servlet.ServletInputStream;
++import javax.servlet.ServletRequest;
++import javax.servlet.ServletResponse;
+ import javax.servlet.http.Cookie;
+ import javax.servlet.http.HttpServletRequest;
++import javax.servlet.http.HttpServletResponse;
+ import javax.servlet.http.HttpSession;
++import javax.servlet.http.Part;
+ import javax.xml.parsers.ParserConfigurationException;
+ 
+ import org.apache.jackrabbit.webdav.bind.BindInfo;
+@@ -817,11 +827,11 @@
+         return httpRequest.getHeader(s);
+     }
+ 
+-    public Enumeration<?> getHeaders(String s) {
++    public Enumeration<String> getHeaders(String s) {
+         return httpRequest.getHeaders(s);
+     }
+ 
+-    public Enumeration<?> getHeaderNames() {
++    public Enumeration<String> getHeaderNames() {
+         return httpRequest.getHeaderNames();
+     }
+ 
+@@ -905,7 +915,7 @@
+         return httpRequest.getAttribute(s);
+     }
+ 
+-    public Enumeration<?> getAttributeNames() {
++    public Enumeration<String> getAttributeNames() {
+         return httpRequest.getAttributeNames();
+     }
+ 
+@@ -933,7 +943,7 @@
+         return httpRequest.getParameter(s);
+     }
+ 
+-    public Enumeration<?> getParameterNames() {
++    public Enumeration<String> getParameterNames() {
+         return httpRequest.getParameterNames();
+     }
+ 
+@@ -941,7 +951,7 @@
+         return httpRequest.getParameterValues(s);
+     }
+ 
+-    public Map<?,?> getParameterMap() {
++    public Map<String,String[]> getParameterMap() {
+         return httpRequest.getParameterMap();
+     }
+ 
+@@ -985,7 +995,7 @@
+         return httpRequest.getLocale();
+     }
+ 
+-    public Enumeration<?> getLocales() {
++    public Enumeration<Locale> getLocales() {
+         return httpRequest.getLocales();
+     }
+ 
+@@ -1000,4 +1010,53 @@
+     public String getRealPath(String s) {
+         return httpRequest.getRealPath(s);
+     }
++
++    //---< servlet 3.0 >---
++    public Part getPart(String name) throws IOException, IllegalStateException, ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public Collection<Part> getParts() throws IOException, IllegalStateException, ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public void logout() throws ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public void login(String username, String password) throws ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public DispatcherType getDispatcherType() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public AsyncContext getAsyncContext() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public boolean isAsyncSupported() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public boolean isAsyncStarted() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public AsyncContext startAsync() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public ServletContext getServletContext() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
+ }
+diff -Nru jackrabbit-2.4.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java jackrabbit-2.4.2-gil/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java
+--- jackrabbit-2.4.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java	2013-03-01 09:00:57.564812869 +0100
++++ jackrabbit-2.4.2-gil/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java	2013-03-01 09:00:23.297707984 +0100
+@@ -32,6 +32,7 @@
+ import org.w3c.dom.Document;
+ import org.xml.sax.SAXException;
+ 
++import javax.servlet.ServletException;
+ import javax.servlet.ServletOutputStream;
+ import javax.servlet.http.Cookie;
+ import javax.servlet.http.HttpServletResponse;
+@@ -42,6 +43,7 @@
+ import java.io.OutputStreamWriter;
+ import java.io.PrintWriter;
+ import java.io.Writer;
++import java.util.Collection;
+ import java.util.Locale;
+ 
+ /**
+@@ -314,4 +316,25 @@
+     public Locale getLocale() {
+         return httpResponse.getLocale();
+     }
++
++    //---< servlet 3.0 >---
++    public Collection<String> getHeaderNames() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public String getHeader(String name) {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public Collection<String> getHeaders(String name) {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public void logout() throws ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public int getStatus() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
+ }
diff --git a/jackrabbit.spec b/jackrabbit.spec
index b9ea117..4f41aab 100644
--- a/jackrabbit.spec
+++ b/jackrabbit.spec
@@ -1,6 +1,6 @@
 Name:          jackrabbit
 Version:       2.4.2
-Release:       5%{?dist}
+Release:       6%{?dist}
 Summary:       Implementation of the Content Repository for Java Technology API
 Group:         Development/Libraries
 License:       ASL 2.0
@@ -8,7 +8,10 @@ URL:           http://jackrabbit.apache.org/
 Source0:       http://archive.apache.org/dist/%{name}/%{version}/%{name}-%{version}-src.zip
 # force tomcat6-servlet-2.5-api apis use
 Source1:       jackrabbit-depmap
+# build fix for servlet 2.5
 Patch0:        0001-Conform-to-newer-servlet-API.patch
+# build fix for servlet 3.0
+Patch1:        jackrabbit-2.4.2-servlet30.patch
 
 BuildArch:     noarch
 
@@ -16,7 +19,7 @@ BuildRequires: java-devel
 BuildRequires: jpackage-utils
 # main deps
 # javax.servlet:servlet-api:2.3
-BuildRequires: servlet = 2.5
+BuildRequires: tomcat-servlet-3.0-api
 #BuildRequires: mvn(biz.aQute:bndlib)
 #BuildRequires: mvn(commons-httpclient:commons-httpclient)
 #BuildRequires: mvn(org.slf4j:slf4j-api)
@@ -68,8 +71,9 @@ This package contains the API documentation for %{name}-webdav.
 %prep
 %setup -q
 %patch0 -p1
-# [WARNING] Could not load depmap file /builddir/build/BUILD/jackrabbit-2.4.2/jackrabbit-webdav:
-# java.io.FileNotFoundException:  (No such file or directory)
+%patch1 -p1
+
+# maven-local load in classpath wrong library. also using the file depmap
 %pom_remove_dep javax.servlet:servlet-api %{name}-webdav
 %pom_xpath_inject "pom:dependencies" "
   <dependency>
@@ -77,7 +81,7 @@ This package contains the API documentation for %{name}-webdav.
     <artifactId>servlet-api</artifactId>
     <version>any</version>
     <scope>system</scope>
-    <systemPath>$(build-classpath tomcat6-servlet-2.5-api)</systemPath>
+    <systemPath>$(build-classpath tomcat-servlet-3.0-api)</systemPath>
   </dependency>" %{name}-webdav
     
 %build
@@ -114,6 +118,9 @@ touch -r %{name}-webdav/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}-webdav.p
 %doc NOTICE.txt LICENSE.txt
 
 %changelog
+* Fri Mar 01 2013 gil cattaneo <puntogil at libero.it> 2.4.2-6
+- rebuilt with tomcat-servlet-3.0-api support
+
 * Sat Feb 16 2013 gil cattaneo <puntogil at libero.it> 2.4.2-5
 - build fix for f19
 


More information about the scm-commits mailing list