commit 2d2a34f7ada956d13ed8aa786d137137e33b8128
Author: Tomas Radej <tradej(a)redhat.com>
Date: Fri May 3 14:44:37 2013 +0200
Updated to latest upstream version
- Fixed and reenabled tests
maven-shared-utils-tests.patch | 94 ++++++++++++++++++++++++++++++++++++++++
maven-shared-utils.spec | 15 +++++--
2 files changed, 105 insertions(+), 4 deletions(-)
---
diff --git a/maven-shared-utils-tests.patch b/maven-shared-utils-tests.patch
new file mode 100644
index 0000000..214108d
--- /dev/null
+++ b/maven-shared-utils-tests.patch
@@ -0,0 +1,94 @@
+diff --git a/pom.xml b/pom.xml
+index e12f7e6..bb0745f 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -56,7 +56,7 @@
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+- <version>4.9</version>
++ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+diff --git a/src/test/java/org/apache/maven/shared/utils/ExpandTest.java
b/src/test/java/org/apache/maven/shared/utils/ExpandTest.java
+index 298cb70..b032da9 100644
+--- a/src/test/java/org/apache/maven/shared/utils/ExpandTest.java
++++ b/src/test/java/org/apache/maven/shared/utils/ExpandTest.java
+@@ -73,6 +73,7 @@ public class ExpandTest
+ * @return
+ */
+ private File getTestTargetDir()
++ throws Exception
+ {
+ return tempFolder.newFolder( TEST_ZIP_TARGET_FOLDER );
+ }
+diff --git a/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java
b/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java
+index 6d8cca3..e9e2ca5 100644
+--- a/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java
++++ b/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java
+@@ -25,6 +25,7 @@ import java.lang.reflect.Constructor;
+
+ import static org.hamcrest.CoreMatchers.*;
+ import static org.junit.Assert.assertThat;
++import static org.junit.Assert.assertTrue;
+ import static org.junit.Assert.fail;
+
+ import static org.apache.maven.shared.utils.testhelpers.ExceptionHelper.*;
+@@ -116,8 +117,8 @@ public class ReflectorTest
+ public void newInstancePublicConstructor()
+ throws Exception
+ {
+- assertThat( reflector.newInstance( ReflectorTestHelper.class, new Object[]{
"" } ),
+- is( ReflectorTestHelper.class ) );
++ assertTrue( reflector.newInstance( ReflectorTestHelper.class, new Object[]{
"" } )
++ instanceof ReflectorTestHelper );
+ }
+
+ @Test( expected = NullPointerException.class )
+@@ -222,8 +223,8 @@ public class ReflectorTest
+ public void getSingletonPublicMethod()
+ throws Exception
+ {
+- assertThat( reflector.getSingleton( ReflectorTestHelper.class, new Object[]{
"" } ),
+- is( ReflectorTestHelper.class ) );
++ assertTrue( reflector.getSingleton( ReflectorTestHelper.class, new Object[]{
"" } )
++ instanceof ReflectorTestHelper );
+ }
+
+ @Test( expected = NullPointerException.class )
+@@ -252,8 +253,8 @@ public class ReflectorTest
+ public void getSingletonNonStaticMethod()
+ throws Exception
+ {
+- assertThat( reflector.getSingleton( ReflectorTestHelper.class, new Object[]{
"", Boolean.FALSE } ),
+- is( ReflectorTestHelper.class ) );
++ assertTrue( reflector.getSingleton( ReflectorTestHelper.class, new Object[]{
"", Boolean.FALSE } )
++ instanceof ReflectorTestHelper );
+ }
+
+ //// invoke( Object, String, Object[] )
+@@ -866,8 +867,8 @@ public class ReflectorTest
+ public void invokeStaticPublicMethod()
+ throws Exception
+ {
+- assertThat( reflector.invokeStatic( ReflectorTestHelper.class,
"getInstance", new Object[]{ "" } ),
+- is( ReflectorTestHelper.class ) );
++ assertTrue( reflector.invokeStatic( ReflectorTestHelper.class,
"getInstance", new Object[]{ "" } )
++ instanceof ReflectorTestHelper );
+ }
+
+ @Test( expected = NullPointerException.class )
+@@ -896,9 +897,9 @@ public class ReflectorTest
+ public void invokeStaticNonStaticMethod()
+ throws Exception
+ {
+- assertThat(
+- reflector.invokeStatic( ReflectorTestHelper.class, "getInstance",
new Object[]{ "", Boolean.FALSE } ),
+- is( ReflectorTestHelper.class ) );
++ assertTrue(
++ reflector.invokeStatic( ReflectorTestHelper.class, "getInstance",
new Object[]{ "", Boolean.FALSE } )
++ instanceof ReflectorTestHelper );
+ }
+
+ //// getConstructor( Class, Class[] )
diff --git a/maven-shared-utils.spec b/maven-shared-utils.spec
index a33bea3..cc03216 100644
--- a/maven-shared-utils.spec
+++ b/maven-shared-utils.spec
@@ -1,10 +1,13 @@
Name: maven-shared-utils
-Version: 0.3
-Release: 2%{?dist}
+Version: 0.4
+Release: 1%{?dist}
Summary: Maven shared utility classes
License: ASL 2.0
URL:
http://maven.apache.org/shared/maven-shared-utils
Source0:
http://repo1.maven.org/maven2/org/apache/maven/shared/%{name}/%{version}/...
+# Patching tests so that they are compatible with JUnit 4.11
+# (upstream bug
http://jira.codehaus.org/browse/MSHARED-285)
+Patch0: %{name}-tests.patch
BuildArch: noarch
@@ -30,10 +33,10 @@ API documentation for %{name}.
%prep
%setup -q
%pom_remove_plugin org.codehaus.mojo:findbugs-maven-plugin
+%patch0 -p1
%build
-# tests don't work with junit >= 4.11
-%mvn_build -f
+%mvn_build
%install
%mvn_install
@@ -45,6 +48,10 @@ API documentation for %{name}.
%doc LICENSE NOTICE
%changelog
+* Mon Apr 22 2013 Tomas Radej <tradej(a)redhat.com> - 0.4-1
+- Updated to latest upstream version
+- Fixed and reenabled tests
+
* Mon Apr 08 2013 Michal Srb <msrb(a)redhat.com> - 0.3-2
- Disable tests (they don't work with junit >= 4.11)