Fix non-portlet build.

Also changed patch to pom macros and removed now unneeded surefire BR.
This commit is contained in:
Severin Gehwolf 2013-04-19 11:53:46 +02:00
commit 4e1e6c15cd

View file

@ -3,7 +3,7 @@
Name: apache-%{short_name}
Version: 1.3
Release: 1%{?dist}
Release: 2%{?dist}
Summary: This package provides an api to work with html file upload
License: ASL 2.0
Group: Development/Libraries
@ -12,7 +12,6 @@ Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short
BuildArch: noarch
Patch1: %{name}-portlet20.patch
Patch2: %{name}-remove-portlet.patch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: maven-local
@ -30,7 +29,6 @@ BuildRequires: maven-javadoc-plugin
BuildRequires: maven-plugin-bundle
BuildRequires: maven-release-plugin
BuildRequires: maven-resources-plugin
BuildRequires: maven-surefire-plugin
%if 0%{?fedora}
BuildRequires: portlet-2.0-api
%endif
@ -74,9 +72,11 @@ sed -i 's/\r//' NOTICE.txt
sed -i "s|<groupId>portlet-api</groupId>|<groupId>javax.portlet</groupId>|" pom.xml
%else
# Non-Fedora: remove portlet stuff
%patch2 -p0
rm -rf src/java/org/apache/commons/fileupload/portlet
rm -f src/test/org/apache/commons/fileupload/*Portlet*
%pom_remove_dep portlet-api:portlet-api
%pom_xpath_remove pom:properties/pom:commons.osgi.import
%pom_xpath_remove pom:properties/pom:commons.osgi.dynamicImport
rm -r src/main/java/org/apache/commons/fileupload/portlet
rm src/test/java/org/apache/commons/fileupload/*Portlet*
%endif
# -----------------------------------------------------------------------------
@ -124,6 +124,10 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
# -----------------------------------------------------------------------------
%changelog
* Thu Apr 18 2013 Severin Gehwolf <sgehwolf@redhat.com> 1.3-2
- Use pom macros over patch.
- Remove surefire maven plugin since tests are skipped anyway.
* Thu Mar 28 2013 Michal Srb <msrb@redhat.com> - 1.3-1
- Update to upstream version 1.3