diff --git a/sisu-ignored-tests.patch b/sisu-ignored-tests.patch new file mode 100644 index 0000000..1115049 --- /dev/null +++ b/sisu-ignored-tests.patch @@ -0,0 +1,54 @@ +--- sisu-inject/org.eclipse.sisu.inject.tests/src/org/eclipse/sisu/inject/LocatedBeansTest.java~ 2014-09-12 08:32:32.899725268 +0200 ++++ sisu-inject/org.eclipse.sisu.inject.tests/src/org/eclipse/sisu/inject/LocatedBeansTest.java 2014-09-12 08:37:45.656099710 +0200 +@@ -128,30 +128,6 @@ + assertSame( a, itr2.next().getValue() ); + } + +- public void testUnrestrictedSearch() +- { +- final LocatedBeans beans = locate( Key.get( Bean.class ) ); +- final Iterator> itr = beans.iterator(); +- +- assertTrue( itr.hasNext() ); +- assertEquals( QualifyingStrategy.DEFAULT_QUALIFIER, itr.next().getKey() ); +- assertTrue( itr.hasNext() ); +- assertEquals( QualifyingStrategy.BLANK_QUALIFIER, itr.next().getKey() ); +- assertTrue( itr.hasNext() ); +- assertEquals( Names.named( "Named1" ), itr.next().getKey() ); +- assertTrue( itr.hasNext() ); +- assertEquals( Names.named( "Named2" ), itr.next().getKey() ); +- assertTrue( itr.hasNext() ); +- assertEquals( QualifyingStrategy.BLANK_QUALIFIER, itr.next().getKey() ); +- assertTrue( itr.hasNext() ); +- assertEquals( MarkedBeanImpl1.class.getAnnotation( Marked.class ), itr.next().getKey() ); +- assertTrue( itr.hasNext() ); +- assertEquals( Names.named( "Marked2" ), itr.next().getKey() ); +- assertTrue( itr.hasNext() ); +- assertEquals( Names.named( "Marked3" ), itr.next().getKey() ); +- assertFalse( itr.hasNext() ); +- } +- + public void testNamedSearch() + { + final LocatedBeans beans = locate( Key.get( Bean.class, Named.class ) ); +@@ -181,20 +156,6 @@ + assertFalse( itr.hasNext() ); + } + +- public void testMarkedSearch() +- { +- final LocatedBeans beans = locate( Key.get( Bean.class, Marked.class ) ); +- final Iterator> itr = beans.iterator(); +- +- assertTrue( itr.hasNext() ); +- assertEquals( MarkedBeanImpl1.class.getAnnotation( Marked.class ), itr.next().getKey() ); +- assertTrue( itr.hasNext() ); +- assertEquals( MarkedBeanImpl2.class.getAnnotation( Marked.class ), itr.next().getKey() ); +- assertTrue( itr.hasNext() ); +- assertEquals( MarkedBeanProvider.class.getAnnotation( Marked.class ), itr.next().getKey() ); +- assertFalse( itr.hasNext() ); +- } +- + public void testMarkedWithAttributesSearch() + { + final LocatedBeans beans = diff --git a/sisu-java8.patch b/sisu-java8.patch new file mode 100644 index 0000000..86567e9 --- /dev/null +++ b/sisu-java8.patch @@ -0,0 +1,38 @@ +--- sisu-inject/org.eclipse.sisu.inject.tests/src/org/eclipse/sisu/inject/TypeArgumentsTest.java.~ 2014-04-21 16:32:25.000000000 +0200 ++++ sisu-inject/org.eclipse.sisu.inject.tests/src/org/eclipse/sisu/inject/TypeArgumentsTest.java 2014-09-12 08:14:58.641201053 +0200 +@@ -10,6 +10,8 @@ + *******************************************************************************/ + package org.eclipse.sisu.inject; + ++import java.lang.annotation.Annotation; ++import java.lang.reflect.AnnotatedType; + import java.lang.reflect.GenericDeclaration; + import java.lang.reflect.ParameterizedType; + import java.lang.reflect.Type; +@@ -362,6 +364,26 @@ + return new Type[] { String.class }; + } + ++ public AnnotatedType[] getAnnotatedBounds() ++ { ++ return new AnnotatedType[0]; ++ } ++ ++ public Annotation[] getAnnotations() ++ { ++ return new Annotation[0]; ++ } ++ ++ public Annotation[] getDeclaredAnnotations() ++ { ++ return new Annotation[0]; ++ } ++ ++ public T getAnnotation(Class annotationClass) ++ { ++ return null; ++ } ++ + public GenericDeclaration getGenericDeclaration() + { + return null; diff --git a/sisu.spec b/sisu.spec index 67ee483..4ec0f0f 100644 --- a/sisu.spec +++ b/sisu.spec @@ -14,6 +14,8 @@ Source0: http://git.eclipse.org/c/%{name}/org.eclipse.%{name}.inject.git/ Source1: http://git.eclipse.org/c/%{name}/org.eclipse.%{name}.plexus.git/snapshot/releases/%{version}.tar.bz2#/org.eclipse.%{name}.plexus-%{version}.tar.bz2 Patch0: %{name}-OSGi-import-guava.patch +Patch1: %{name}-java8.patch +Patch2: %{name}-ignored-tests.patch BuildArch: noarch @@ -115,6 +117,8 @@ tar xf %{SOURCE0} && mv releases/* sisu-inject && rmdir releases tar xf %{SOURCE1} && mv releases/* sisu-plexus && rmdir releases %patch0 +%patch1 +%patch2 %mvn_file ":{*}" @1 # Install JARs and POMs only @@ -122,9 +126,10 @@ tar xf %{SOURCE1} && mv releases/* sisu-plexus && rmdir releases %mvn_package : __noinstall %pom_disable_module org.eclipse.sisu.inject.site sisu-inject -%pom_disable_module org.eclipse.sisu.inject.tests sisu-inject %pom_disable_module org.eclipse.sisu.plexus.site sisu-plexus -%pom_disable_module org.eclipse.sisu.plexus.tests sisu-plexus + +%pom_add_dep net.sf.cglib:cglib::test sisu-inject/org.eclipse.sisu.inject.tests +%pom_add_dep net.sf.cglib:cglib::test sisu-plexus/org.eclipse.sisu.plexus.tests for pom in \ sisu-inject \ @@ -195,6 +200,7 @@ EOF %changelog * Fri Sep 12 2014 Mikolaj Izdebski - 1:0.2.1-8 - Update to latest XMvn version +- Enable tests * Mon Aug 4 2014 Mikolaj Izdebski - 1:0.2.1-7 - Fix build-requires on sonatype-oss-parent