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-bsf.patch b/apache-commons-jexl-bsf.patch
deleted file mode 100644
index 99fbb26..0000000
--- a/apache-commons-jexl-bsf.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -up commons-jexl-2.1.1-src/pom.xml.bsf commons-jexl-2.1.1-src/pom.xml
---- commons-jexl-2.1.1-src/pom.xml.bsf 2011-12-19 06:15:02.000000000 -0700
-+++ commons-jexl-2.1.1-src/pom.xml 2011-12-24 21:08:45.519401880 -0700
-@@ -110,13 +110,6 @@
- 4.10
- test
-
--
--
-- org.apache.bsf
-- bsf-api
-- 3.1
-- provided
--
-
-
-
-@@ -282,4 +275,4 @@
-
-
-
--
-\ 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 - 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 - 2.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild