[apache-commons-jexl] - Update to current maven spec guidelines to fix build (bug 979497) - Add patch to fix test with jun

Orion Poplawski orion at fedoraproject.org
Fri Jun 28 20:57:30 UTC 2013


commit a4e222e47274dfba28346b3599e91b2624a0ca57
Author: Orion Poplawski <orion at nwra.com>
Date:   Fri Jun 28 14:57:21 2013 -0600

    - Update to current maven spec guidelines to fix build (bug 979497)
    - Add patch to fix test with junit 4.11

 001-Fix-tests.patch           |   21 +++++++++++++++++
 apache-commons-jexl-bsf.patch |   24 -------------------
 apache-commons-jexl.spec      |   50 +++++++++++++---------------------------
 3 files changed, 37 insertions(+), 58 deletions(-)
---
diff --git a/001-Fix-tests.patch b/001-Fix-tests.patch
new file mode 100644
index 0000000..b2859c8
--- /dev/null
+++ b/001-Fix-tests.patch
@@ -0,0 +1,21 @@
+Description: Fix a test failure with JUnit 4.11 due to the out of order
+ execution of the test methods. This issue is fixed in JEXL 3.
+Author: Emmanuel Bourg
+Forwarded: not-needed
+--- a/src/test/java/org/apache/commons/jexl2/ArithmeticTest.java
++++ b/src/test/java/org/apache/commons/jexl2/ArithmeticTest.java
+@@ -137,6 +137,7 @@
+      * test some simple mathematical calculations
+      */
+     public void testCalculations() throws Exception {
++        JexlThreadedArithmetic.setLenient(Boolean.TRUE);
+ 
+         asserter.setVariable("foo", new Integer(2));
+ 
+@@ -347,4 +348,4 @@
+         }
+         debuggerCheck(jexl);
+     }
+-}
+\ No newline at end of file
++}
diff --git a/apache-commons-jexl.spec b/apache-commons-jexl.spec
index 89763a5..13828fe 100644
--- a/apache-commons-jexl.spec
+++ b/apache-commons-jexl.spec
@@ -2,31 +2,21 @@
 
 Name:           apache-%{jarname}
 Version:        2.1.1
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Java Expression Language (JEXL)
 
 Group:          Development/Libraries
 License:        ASL 2.0
 URL:            http://commons.apache.org/jexl
 Source0:        http://www.apache.org/dist/commons/jexl/source/%{jarname}-%{version}-src.tar.gz
-# Java 1.6 contains bsf 3.0, so we don't need the dependency in the pom.xml file
-Patch0:         %{name}-bsf.patch
+# Patch to fix test failure with junit 4.11
+Patch0:         001-Fix-tests.patch
 
-BuildRequires:  jpackage-utils
-BuildRequires:  java-devel >= 1:1.6.0
-BuildRequires:  apache-commons-parent
 BuildRequires:  maven-local
-BuildRequires:  apache-rat-plugin
-BuildRequires:  buildnumber-maven-plugin
 BuildRequires:  javacc-maven-plugin
-BuildRequires:  maven-dependency-plugin
-BuildRequires:  maven-release-plugin
-BuildRequires:  maven-surefire-provider-junit4
 
 BuildArch:      noarch
 
-Requires:       jpackage-utils
-Requires:       java
 Provides:       %{jarname} = %{version}-%{release}
 
 %description
@@ -56,43 +46,35 @@ This package contains the API documentation for %{name}.
 
 %prep
 %setup -q -n %{jarname}-%{version}-src
-%patch0 -p1 -b .bsf
-find \( -name '*.jar' -o -name '*.class' \) -exec rm -f '{}' +
+%patch0 -p1 -b .test
+# Java 1.6 contains bsf 3.0, so we don't need the dependency in the pom.xml file
+%pom_remove_dep org.apache.bsf:bsf-api
+find \( -name '*.jar' -o -name '*.class' \) -delete
 # Fix line endings
 find -name '*.txt' -exec sed -i 's/\r//' '{}' +
 
 
 %build
-mvn-rpmbuild install javadoc:aggregate
-
-%install
-
-mkdir -p $RPM_BUILD_ROOT%{_javadir}
-cp target/%{jarname}-%{version}.jar  $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
-ln -s %{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{jarname}.jar
+%mvn_build
 
-mkdir -p $RPM_BUILD_ROOT%{_javadocdir}
-cp -rp target/site/apidocs \
-$RPM_BUILD_ROOT%{_javadocdir}/%{name}
 
-mkdir -p $RPM_BUILD_ROOT/%{_mavenpomdir}
-cp -p pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
-%add_maven_depmap JPP-%{name}.pom %{name}.jar -a 'commons-jexl:commons-jexl'
+%install
+%mvn_install
 
 
-%files
+%files -f .mfiles
 %doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
-%{_mavenpomdir}/JPP-%{name}.pom
-%{_mavendepmapfragdir}/%{name}
-%{_javadir}/%{name}.jar
-%{_javadir}/%{jarname}.jar
 
-%files javadoc
+%files javadoc -f .mfiles-javadoc
 %doc LICENSE.txt
 %{_javadocdir}/%{name}
 
 
 %changelog
+* Thu Jun 28 2013 Orion Poplawski <orion at cora.nwra.com> - 2.1.1-6
+- Update to current maven spec guidelines to fix build (bug 979497)
+- Add patch to fix test with junit 4.11
+
 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.1.1-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list