diff --git a/apache-commons-fileupload-1.2.2-portlet20.patch b/apache-commons-fileupload-portlet20.patch similarity index 58% rename from apache-commons-fileupload-1.2.2-portlet20.patch rename to apache-commons-fileupload-portlet20.patch index b63ae9b..378b7a4 100644 --- a/apache-commons-fileupload-1.2.2-portlet20.patch +++ b/apache-commons-fileupload-portlet20.patch @@ -1,63 +1,65 @@ -diff -Nru src/test/org/apache/commons/fileupload/MockPortletRequest.java src/test/org/apache/commons/fileupload-gil/MockPortletRequest.java ---- src/test/org/apache/commons/fileupload/MockPortletRequest.java 2010-07-14 23:28:52.000000000 +0200 -+++ src/test/org/apache/commons/fileupload-gil/MockPortletRequest.java 2012-05-29 15:17:56.000000000 +0200 -@@ -27,6 +27,7 @@ - import javax.portlet.PortletRequest; - import javax.portlet.PortletSession; - import javax.portlet.WindowState; -+import javax.servlet.http.Cookie; - - /** - * A mock portlet request, useful for unit testing and offline utilities -@@ -313,4 +314,24 @@ - return null; - } - -+ public Map getPublicParameterMap() { -+ // TODO -+ throw new UnsupportedOperationException("Not supported."); -+ } -+ -+ public Map getPrivateParameterMap() { -+ // TODO -+ throw new UnsupportedOperationException("Not supported."); -+ } -+ -+ public Cookie[] getCookies() { -+ // TODO -+ throw new UnsupportedOperationException("Not supported."); -+ } -+ -+ public String getWindowID() { -+ // TODO -+ throw new UnsupportedOperationException("Not supported."); -+ } -+ - } -diff -Nru src/test/org/apache/commons/fileupload/MockPortletSession.java src/test/org/apache/commons/fileupload-gil/MockPortletSession.java ---- src/test/org/apache/commons/fileupload/MockPortletSession.java 2010-07-14 23:28:52.000000000 +0200 -+++ src/test/org/apache/commons/fileupload-gil/MockPortletSession.java 2012-05-29 15:07:35.000000000 +0200 -@@ -18,6 +18,7 @@ - - import java.util.Enumeration; - import java.util.Hashtable; -+import java.util.Map; - import javax.portlet.PortletContext; - import javax.portlet.PortletSession; - -@@ -168,4 +169,15 @@ - // TODO Auto-generated method stub - return null; - } -+ -+ public Map getAttributeMap(int scope) { -+ // TODO -+ throw new UnsupportedOperationException("Not supported."); -+ } -+ -+ public Map getAttributeMap() { -+ // TODO -+ throw new UnsupportedOperationException("Not supported."); -+ } -+ - } +diff --git a/src/test/org/apache/commons/fileupload/MockPortletRequest.java b/src/test/org/apache/commons/fileupload/MockPortletRequest.java +index 28cda7a..9e4e4a0 100644 +--- a/src/test/org/apache/commons/fileupload/MockPortletRequest.java ++++ b/src/test/org/apache/commons/fileupload/MockPortletRequest.java +@@ -27,6 +27,7 @@ import javax.portlet.PortletPreferences; + import javax.portlet.PortletRequest; + import javax.portlet.PortletSession; + import javax.portlet.WindowState; ++import javax.servlet.http.Cookie; + + /** + * A mock portlet request, useful for unit testing and offline utilities +@@ -312,5 +313,24 @@ public class MockPortletRequest implements PortletRequest + { + return null; + } ++ ++ public Map getPublicParameterMap() { ++ // TODO ++ throw new UnsupportedOperationException("Not supported."); ++ } ++ ++ public Map getPrivateParameterMap() { ++ // TODO ++ throw new UnsupportedOperationException("Not supported."); ++ } + ++ public Cookie[] getCookies() { ++ // TODO ++ throw new UnsupportedOperationException("Not supported."); ++ } ++ ++ public String getWindowID() { ++ // TODO ++ throw new UnsupportedOperationException("Not supported."); ++ } + } +diff --git a/src/test/org/apache/commons/fileupload/MockPortletSession.java b/src/test/org/apache/commons/fileupload/MockPortletSession.java +index 76f57c2..aa0b967 100644 +--- a/src/test/org/apache/commons/fileupload/MockPortletSession.java ++++ b/src/test/org/apache/commons/fileupload/MockPortletSession.java +@@ -18,6 +18,7 @@ package org.apache.commons.fileupload; + + import java.util.Enumeration; + import java.util.Hashtable; ++import java.util.Map; + import javax.portlet.PortletContext; + import javax.portlet.PortletSession; + +@@ -168,4 +169,15 @@ public class MockPortletSession implements PortletSession + // TODO Auto-generated method stub + return null; + } ++ ++ public Map getAttributeMap(int scope) { ++ // TODO ++ throw new UnsupportedOperationException("Not supported."); ++ } ++ ++ public Map getAttributeMap() { ++ // TODO ++ throw new UnsupportedOperationException("Not supported."); ++ } ++ + } diff --git a/apache-commons-fileupload-remove-portlet.patch b/apache-commons-fileupload-remove-portlet.patch deleted file mode 100644 index 90689cd..0000000 --- a/apache-commons-fileupload-remove-portlet.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- pom.xml 2010-10-20 16:08:37.203973687 +0200 -+++ pom.xml 2010-10-20 16:09:32.984097099 +0200 -@@ -147,8 +147,6 @@ - 1.2.1 - FILEUPLOAD - 12310476 -- !javax.portlet,* -- javax.portlet - - - -@@ -189,12 +187,6 @@ - provided - - -- portlet-api -- portlet-api -- 1.0 -- provided -- -- - commons-io - commons-io - 1.3.2 diff --git a/apache-commons-fileupload.spec b/apache-commons-fileupload.spec index b9c142f..d87865a 100644 --- a/apache-commons-fileupload.spec +++ b/apache-commons-fileupload.spec @@ -3,7 +3,7 @@ Name: apache-%{short_name} Version: 1.2.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: This package provides an api to work with html file upload License: ASL 2.0 Group: Development/Libraries @@ -11,10 +11,7 @@ URL: http://commons.apache.org/%{base_name}/ Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz BuildArch: noarch -# Portlets are not in Fedora yet -#P atch0: % {name}-remove-portlet.patch - -Patch1: %{name}-%{version}-portlet20.patch +Patch1: %{name}-portlet20.patch BuildRequires: java-devel >= 1:1.6.0 BuildRequires: junit >= 0:3.8.1 @@ -31,8 +28,7 @@ BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-bundle BuildRequires: maven-release-plugin BuildRequires: maven-resources-plugin -#Should be replaced by maven-surefire-plugin after f15 branch -BuildRequires: maven-surefire-maven-plugin +BuildRequires: maven-surefire-plugin BuildRequires: portlet-2.0-api Requires: java >= 1:1.6.0 @@ -67,12 +63,7 @@ This package contains the API documentation for %{name}. sed -i 's/\r//' LICENSE.txt sed -i 's/\r//' NOTICE.txt -# Remove portlet stuff -#%p atch0 -p0 -#rm -rf src/java/org/apache/commons/fileupload/portlet -#rm -f src/test/org/apache/commons/fileupload/*Portlet* - -%patch1 -p0 +%patch1 -p1 # fix gId sed -i "s|portlet-api|javax.portlet|" pom.xml @@ -120,6 +111,10 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || : # ----------------------------------------------------------------------------- %changelog +* Mon Jun 04 2012 Stanislav Ochotnicky - 1.2.2-6 +- Fix up patches to apply, cleanup spec old coments +- Fix surefire plugin dependency to use new name + * Tue May 29 2012 gil cattaneo 1.2.2-5 - Add portlet-2.0-api support (required by springframework).