From fbdd0651d24d6066f726479fb98fb3708920db94 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 29 Nov 2018 12:55:39 +0000 Subject: [PATCH 01/15] Remove Obsoletes --- sisu.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/sisu.spec b/sisu.spec index 6c0a353..e6abb99 100644 --- a/sisu.spec +++ b/sisu.spec @@ -49,7 +49,6 @@ style dependency injection. %package inject Summary: Sisu inject -Obsoletes: %{name}-tests < 1:0.3.2-5 %description inject This package contains %{summary}. From 8d4408f3f5f684d4193d7764bffc47a200a225a5 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 24 May 2019 17:01:40 +0200 Subject: [PATCH 02/15] Mass rebuild for javapackages-tools 201901 --- sisu.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sisu.spec b/sisu.spec index e6abb99..ee72be2 100644 --- a/sisu.spec +++ b/sisu.spec @@ -5,7 +5,7 @@ Name: sisu Epoch: 1 Version: 0.3.3 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Eclipse dependency injection framework # sisu is EPL-1.0 # bundled asm is BSD @@ -101,6 +101,9 @@ cp %{SOURCE102} sisu-plexus/pom.xml %changelog +* Fri May 24 2019 Mikolaj Izdebski - 1:0.3.3-7 +- Mass rebuild for javapackages-tools 201901 + * Tue Jul 24 2018 Michael Simacek - 1:0.3.3-6 - Declare bundled objectweb-asm - Fix license tag to include BSD for asm From 536e2ecec3b16158fbdc79be8c7f7c3bb37a04a4 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 28 Jun 2019 14:27:53 +0200 Subject: [PATCH 03/15] Use javadoc_package macro --- sisu.spec | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/sisu.spec b/sisu.spec index ee72be2..67c735a 100644 --- a/sisu.spec +++ b/sisu.spec @@ -1,7 +1,3 @@ -# Release type, either "milestone" or "release" -%global reltype release -#global reltag .M1 - Name: sisu Epoch: 1 Version: 0.3.3 @@ -11,9 +7,10 @@ Summary: Eclipse dependency injection framework # bundled asm is BSD License: EPL-1.0 and BSD URL: http://eclipse.org/sisu +BuildArch: noarch -Source0: http://git.eclipse.org/c/%{name}/org.eclipse.%{name}.inject.git/snapshot/%{reltype}s/%{version}%{?reltag}.tar.bz2#/org.eclipse.%{name}.inject-%{version}%{?reltag}.tar.bz2 -Source1: http://git.eclipse.org/c/%{name}/org.eclipse.%{name}.plexus.git/snapshot/%{reltype}s/%{version}%{?reltag}.tar.bz2#/org.eclipse.%{name}.plexus-%{version}%{?reltag}.tar.bz2 +Source0: http://git.eclipse.org/c/%{name}/org.eclipse.%{name}.inject.git/snapshot/releases/%{version}.tar.bz2#/org.eclipse.%{name}.inject-%{version}.tar.bz2 +Source1: http://git.eclipse.org/c/%{name}/org.eclipse.%{name}.plexus.git/snapshot/releases/%{version}.tar.bz2#/org.eclipse.%{name}.plexus-%{version}.tar.bz2 Source100: %{name}-parent.pom Source101: %{name}-inject.pom @@ -23,8 +20,6 @@ Patch0: %{name}-OSGi-import-guava.patch Patch2: %{name}-ignored-tests.patch Patch3: %{name}-osgi-api.patch -BuildArch: noarch - BuildRequires: maven-local BuildRequires: mvn(com.google.inject.extensions:guice-servlet) BuildRequires: mvn(com.google.inject:guice::no_aop:) @@ -42,7 +37,6 @@ BuildRequires: mvn(org.testng:testng) Provides: bundled(objectweb-asm) - %description Java dependency injection framework with backward support for plexus and bean style dependency injection. @@ -59,16 +53,12 @@ Summary: Sisu Plexus %description plexus This package contains %{summary}. -%package javadoc -Summary: API documentation for Sisu - -%description javadoc -This package contains %{summary}. +%{?javadoc_package} %prep %setup -q -c -T -tar xf %{SOURCE0} && mv %{reltype}s/* sisu-inject && rmdir %{reltype}s -tar xf %{SOURCE1} && mv %{reltype}s/* sisu-plexus && rmdir %{reltype}s +tar xf %{SOURCE0} && mv releases/* sisu-inject && rmdir releases +tar xf %{SOURCE1} && mv releases/* sisu-plexus && rmdir releases cp %{SOURCE100} pom.xml cp %{SOURCE101} sisu-inject/pom.xml @@ -92,14 +82,10 @@ cp %{SOURCE102} sisu-plexus/pom.xml %mvn_install %files inject -f .mfiles-inject -%doc sisu-inject/LICENSE.txt +%license sisu-inject/LICENSE.txt %files plexus -f .mfiles-plexus -%files javadoc -f .mfiles-javadoc -%doc sisu-inject/LICENSE.txt - - %changelog * Fri May 24 2019 Mikolaj Izdebski - 1:0.3.3-7 - Mass rebuild for javapackages-tools 201901 From 490502261a67845fdd21eaa4a3e68b76cbf25762 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 28 Jun 2019 14:32:52 +0200 Subject: [PATCH 04/15] Merge inject and plexus subpackages --- sisu.spec | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/sisu.spec b/sisu.spec index 67c735a..c6f93d0 100644 --- a/sisu.spec +++ b/sisu.spec @@ -1,7 +1,7 @@ Name: sisu Epoch: 1 Version: 0.3.3 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Eclipse dependency injection framework # sisu is EPL-1.0 # bundled asm is BSD @@ -41,18 +41,7 @@ Provides: bundled(objectweb-asm) Java dependency injection framework with backward support for plexus and bean style dependency injection. -%package inject -Summary: Sisu inject - -%description inject -This package contains %{summary}. - -%package plexus -Summary: Sisu Plexus - -%description plexus -This package contains %{summary}. - +%{?module_package} %{?javadoc_package} %prep @@ -71,7 +60,7 @@ cp %{SOURCE102} sisu-plexus/pom.xml %pom_xpath_set -r /pom:project/pom:version %{version} %mvn_file ":{*}" @1 -%mvn_package ":*{inject,plexus}" @1 +%mvn_package ":*{inject,plexus}" %mvn_package : __noinstall %mvn_alias :org.eclipse.sisu.plexus org.sonatype.sisu:sisu-inject-plexus @@ -81,12 +70,13 @@ cp %{SOURCE102} sisu-plexus/pom.xml %install %mvn_install -%files inject -f .mfiles-inject +%files -n %{?module_prefix}%{name} -f .mfiles %license sisu-inject/LICENSE.txt -%files plexus -f .mfiles-plexus - %changelog +* Fri Jun 28 2019 Mikolaj Izdebski - 1:0.3.3-8 +- Merge inject and plexus subpackages + * Fri May 24 2019 Mikolaj Izdebski - 1:0.3.3-7 - Mass rebuild for javapackages-tools 201901 From 244522f18a797b1c026babe38dfd8614e7ce71e6 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 28 Jun 2019 14:33:59 +0200 Subject: [PATCH 05/15] Namespace buildrequires --- sisu.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sisu.spec b/sisu.spec index c6f93d0..caed846 100644 --- a/sisu.spec +++ b/sisu.spec @@ -24,13 +24,13 @@ BuildRequires: maven-local BuildRequires: mvn(com.google.inject.extensions:guice-servlet) BuildRequires: mvn(com.google.inject:guice::no_aop:) BuildRequires: mvn(javax.annotation:javax.annotation-api) -BuildRequires: mvn(javax.enterprise:cdi-api) +BuildRequires: %{?module_prefix}mvn(javax.enterprise:cdi-api) BuildRequires: mvn(javax.inject:javax.inject) BuildRequires: mvn(javax.servlet:servlet-api) BuildRequires: mvn(junit:junit) -BuildRequires: mvn(org.codehaus.plexus:plexus-classworlds) -BuildRequires: mvn(org.codehaus.plexus:plexus-component-annotations) -BuildRequires: mvn(org.codehaus.plexus:plexus-utils) +BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-classworlds) +BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-component-annotations) +BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-utils) BuildRequires: mvn(org.osgi:osgi.core) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.testng:testng) From 5c5a617afc4c52b8c0c1b57c024fbdac6f00bab8 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 12 Sep 2019 16:26:07 +0200 Subject: [PATCH 06/15] Remove Epoch --- sisu.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/sisu.spec b/sisu.spec index caed846..59d734f 100644 --- a/sisu.spec +++ b/sisu.spec @@ -1,5 +1,4 @@ Name: sisu -Epoch: 1 Version: 0.3.3 Release: 8%{?dist} Summary: Eclipse dependency injection framework From 18200fb9b54e1a60db039f88693945727453545a Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 12 Sep 2019 16:28:00 +0200 Subject: [PATCH 07/15] Expand unnecessary macros --- sisu.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sisu.spec b/sisu.spec index 59d734f..6b5ede7 100644 --- a/sisu.spec +++ b/sisu.spec @@ -8,16 +8,16 @@ License: EPL-1.0 and BSD URL: http://eclipse.org/sisu BuildArch: noarch -Source0: http://git.eclipse.org/c/%{name}/org.eclipse.%{name}.inject.git/snapshot/releases/%{version}.tar.bz2#/org.eclipse.%{name}.inject-%{version}.tar.bz2 -Source1: http://git.eclipse.org/c/%{name}/org.eclipse.%{name}.plexus.git/snapshot/releases/%{version}.tar.bz2#/org.eclipse.%{name}.plexus-%{version}.tar.bz2 +Source0: http://git.eclipse.org/c/sisu/org.eclipse.sisu.inject.git/snapshot/releases/%{version}.tar.bz2#/org.eclipse.sisu.inject-%{version}.tar.bz2 +Source1: http://git.eclipse.org/c/sisu/org.eclipse.sisu.plexus.git/snapshot/releases/%{version}.tar.bz2#/org.eclipse.sisu.plexus-%{version}.tar.bz2 -Source100: %{name}-parent.pom -Source101: %{name}-inject.pom -Source102: %{name}-plexus.pom +Source100: sisu-parent.pom +Source101: sisu-inject.pom +Source102: sisu-plexus.pom -Patch0: %{name}-OSGi-import-guava.patch -Patch2: %{name}-ignored-tests.patch -Patch3: %{name}-osgi-api.patch +Patch0: sisu-OSGi-import-guava.patch +Patch2: sisu-ignored-tests.patch +Patch3: sisu-osgi-api.patch BuildRequires: maven-local BuildRequires: mvn(com.google.inject.extensions:guice-servlet) @@ -69,7 +69,7 @@ cp %{SOURCE102} sisu-plexus/pom.xml %install %mvn_install -%files -n %{?module_prefix}%{name} -f .mfiles +%files -n %{?module_prefix}sisu -f .mfiles %license sisu-inject/LICENSE.txt %changelog From 27a252c00031779a9eea762b10592725e7dd64b7 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 12 Sep 2019 16:30:15 +0200 Subject: [PATCH 08/15] Remove dependency on glassfish --- ...Remove-support-for-optional-features.patch | 196 ++++++++++++++++++ sisu.spec | 18 +- 2 files changed, 207 insertions(+), 7 deletions(-) create mode 100644 0001-Remove-support-for-optional-features.patch diff --git a/0001-Remove-support-for-optional-features.patch b/0001-Remove-support-for-optional-features.patch new file mode 100644 index 0000000..d868a99 --- /dev/null +++ b/0001-Remove-support-for-optional-features.patch @@ -0,0 +1,196 @@ +From 24db1069d977dc45c5f6abab667346d35cb4ec3d Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Wed, 7 Nov 2018 14:26:24 +0100 +Subject: [PATCH] Remove support for optional features + +--- + .../eclipse/sisu/inject/Implementations.java | 94 +------------------ + .../sisu/space/QualifiedTypeBinder.java | 28 ------ + 2 files changed, 2 insertions(+), 120 deletions(-) + +diff --git a/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java b/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java +index 523c9b2..867f3ce 100644 +--- a/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java ++++ b/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java +@@ -32,43 +32,6 @@ import com.google.inject.spi.UntargettedBinding; + */ + final class Implementations + { +- // ---------------------------------------------------------------------- +- // Static initialization +- // ---------------------------------------------------------------------- +- +- static +- { +- boolean hasGuiceServlet; +- try +- { +- hasGuiceServlet = BindingTargetVisitor.class.isInstance( ServletFinder.THIS ); +- } +- catch ( final LinkageError e ) +- { +- hasGuiceServlet = false; +- } +- HAS_GUICE_SERVLET = hasGuiceServlet; +- +- boolean hasJsr250Priority; +- try +- { +- hasJsr250Priority = javax.annotation.Priority.class.isAnnotation(); +- } +- catch ( final LinkageError e ) +- { +- hasJsr250Priority = false; +- } +- HAS_JSR250_PRIORITY = hasJsr250Priority; +- } +- +- // ---------------------------------------------------------------------- +- // Constants +- // ---------------------------------------------------------------------- +- +- private static final boolean HAS_GUICE_SERVLET; +- +- private static final boolean HAS_JSR250_PRIORITY; +- + // ---------------------------------------------------------------------- + // Constructors + // ---------------------------------------------------------------------- +@@ -105,8 +68,7 @@ final class Implementations + final boolean isPriority = Priority.class.equals( annotationType ); + + // peek behind servlet/filter extension bindings when checking priority, so we can order them by rank +- final Class implementation = +- binding.acceptTargetVisitor( HAS_GUICE_SERVLET && isPriority ? ServletFinder.THIS : ClassFinder.THIS ); ++ final Class implementation = binding.acceptTargetVisitor( ClassFinder.THIS ); + + T annotation = null; + if ( null != implementation ) +@@ -114,11 +76,7 @@ final class Implementations + annotation = implementation.getAnnotation( annotationType ); + if ( null == annotation ) + { +- if ( HAS_JSR250_PRIORITY && isPriority ) +- { +- annotation = adaptJsr250( binding, implementation ); +- } +- else if ( Description.class.equals( annotationType ) ) ++ if ( Description.class.equals( annotationType ) ) + { + annotation = adaptLegacy( binding, implementation ); + } +@@ -131,13 +89,6 @@ final class Implementations + // Implementation methods + // ---------------------------------------------------------------------- + +- @SuppressWarnings( "unchecked" ) +- private static T adaptJsr250( final Binding binding, final Class clazz ) +- { +- final javax.annotation.Priority jsr250 = clazz.getAnnotation( javax.annotation.Priority.class ); +- return null != jsr250 ? (T) new PrioritySource( binding.getSource(), jsr250.value() ) : null; +- } +- + @SuppressWarnings( { "unchecked", "deprecation" } ) + private static T adaptLegacy( final Binding binding, final Class clazz ) + { +@@ -215,45 +166,4 @@ final class Implementations + return binding.getPrivateElements().getInjector().getBinding( binding.getKey() ).acceptTargetVisitor( this ); + } + } +- +- /** +- * {@link ClassFinder} that can also peek behind servlet/filter bindings. +- */ +- static final class ServletFinder +- extends ClassFinder +- implements com.google.inject.servlet.ServletModuleTargetVisitor> +- { +- // ---------------------------------------------------------------------- +- // Constants +- // ---------------------------------------------------------------------- +- +- @SuppressWarnings( "hiding" ) +- static final BindingTargetVisitor> THIS = new ServletFinder(); +- +- // ---------------------------------------------------------------------- +- // Public methods +- // ---------------------------------------------------------------------- +- +- public Class visit( final com.google.inject.servlet.InstanceFilterBinding binding ) +- { +- return binding.getFilterInstance().getClass(); +- } +- +- public Class visit( final com.google.inject.servlet.InstanceServletBinding binding ) +- { +- return binding.getServletInstance().getClass(); +- } +- +- public Class visit( final com.google.inject.servlet.LinkedFilterBinding binding ) +- { +- // this assumes only one level of indirection: api-->impl +- return binding.getLinkedKey().getTypeLiteral().getRawType(); +- } +- +- public Class visit( final com.google.inject.servlet.LinkedServletBinding binding ) +- { +- // this assumes only one level of indirection: api-->impl +- return binding.getLinkedKey().getTypeLiteral().getRawType(); +- } +- } + } +diff --git a/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/space/QualifiedTypeBinder.java b/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/space/QualifiedTypeBinder.java +index 4b34436..d213e19 100644 +--- a/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/space/QualifiedTypeBinder.java ++++ b/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/space/QualifiedTypeBinder.java +@@ -39,32 +39,12 @@ import com.google.inject.name.Names; + public final class QualifiedTypeBinder + implements QualifiedTypeListener + { +- // ---------------------------------------------------------------------- +- // Static initialization +- // ---------------------------------------------------------------------- +- +- static +- { +- boolean hasJsr299Typed; +- try +- { +- hasJsr299Typed = javax.enterprise.inject.Typed.class.isAnnotation(); +- } +- catch ( final LinkageError e ) +- { +- hasJsr299Typed = false; +- } +- HAS_JSR299_TYPED = hasJsr299Typed; +- } +- + // ---------------------------------------------------------------------- + // Constants + // ---------------------------------------------------------------------- + + private static final TypeLiteral OBJECT_TYPE_LITERAL = TypeLiteral.get( Object.class ); + +- private static final boolean HAS_JSR299_TYPED; +- + // ---------------------------------------------------------------------- + // Implementation fields + // ---------------------------------------------------------------------- +@@ -377,14 +357,6 @@ public final class QualifiedTypeBinder + { + for ( Class c = clazz; null != c && c != Object.class; c = c.getSuperclass() ) + { +- if ( HAS_JSR299_TYPED ) +- { +- final javax.enterprise.inject.Typed typed = c.getAnnotation( javax.enterprise.inject.Typed.class ); +- if ( null != typed ) +- { +- return typed.value().length > 0 ? typed.value() : c.getInterfaces(); +- } +- } + final org.eclipse.sisu.Typed typed = c.getAnnotation( org.eclipse.sisu.Typed.class ); + if ( null != typed ) + { +-- +2.21.0 + diff --git a/sisu.spec b/sisu.spec index 6b5ede7..43bde96 100644 --- a/sisu.spec +++ b/sisu.spec @@ -16,16 +16,14 @@ Source101: sisu-inject.pom Source102: sisu-plexus.pom Patch0: sisu-OSGi-import-guava.patch -Patch2: sisu-ignored-tests.patch -Patch3: sisu-osgi-api.patch +Patch1: sisu-ignored-tests.patch +Patch2: sisu-osgi-api.patch + +Patch3: 0001-Remove-support-for-optional-features.patch BuildRequires: maven-local BuildRequires: mvn(com.google.inject.extensions:guice-servlet) BuildRequires: mvn(com.google.inject:guice::no_aop:) -BuildRequires: mvn(javax.annotation:javax.annotation-api) -BuildRequires: %{?module_prefix}mvn(javax.enterprise:cdi-api) -BuildRequires: mvn(javax.inject:javax.inject) -BuildRequires: mvn(javax.servlet:servlet-api) BuildRequires: mvn(junit:junit) BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-classworlds) BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-component-annotations) @@ -53,8 +51,9 @@ cp %{SOURCE101} sisu-inject/pom.xml cp %{SOURCE102} sisu-plexus/pom.xml %patch0 +%patch1 %patch2 -%patch3 +%patch3 -p1 %pom_xpath_set -r /pom:project/pom:version %{version} @@ -63,6 +62,11 @@ cp %{SOURCE102} sisu-plexus/pom.xml %mvn_package : __noinstall %mvn_alias :org.eclipse.sisu.plexus org.sonatype.sisu:sisu-inject-plexus +%pom_remove_dep :javax.inject sisu-inject +%pom_remove_dep :cdi-api sisu-inject +%pom_remove_dep :javax.annotation-api sisu-inject +%pom_remove_dep :servlet-api sisu-inject + %build %mvn_build From 8186fa554868966363a8c28062bf67470774c41d Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 12 Sep 2019 17:37:55 +0200 Subject: [PATCH 09/15] Revert "Remove dependency on glassfish" This reverts commit 27a252c00031779a9eea762b10592725e7dd64b7. --- ...Remove-support-for-optional-features.patch | 196 ------------------ sisu.spec | 18 +- 2 files changed, 7 insertions(+), 207 deletions(-) delete mode 100644 0001-Remove-support-for-optional-features.patch diff --git a/0001-Remove-support-for-optional-features.patch b/0001-Remove-support-for-optional-features.patch deleted file mode 100644 index d868a99..0000000 --- a/0001-Remove-support-for-optional-features.patch +++ /dev/null @@ -1,196 +0,0 @@ -From 24db1069d977dc45c5f6abab667346d35cb4ec3d Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Wed, 7 Nov 2018 14:26:24 +0100 -Subject: [PATCH] Remove support for optional features - ---- - .../eclipse/sisu/inject/Implementations.java | 94 +------------------ - .../sisu/space/QualifiedTypeBinder.java | 28 ------ - 2 files changed, 2 insertions(+), 120 deletions(-) - -diff --git a/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java b/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java -index 523c9b2..867f3ce 100644 ---- a/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java -+++ b/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java -@@ -32,43 +32,6 @@ import com.google.inject.spi.UntargettedBinding; - */ - final class Implementations - { -- // ---------------------------------------------------------------------- -- // Static initialization -- // ---------------------------------------------------------------------- -- -- static -- { -- boolean hasGuiceServlet; -- try -- { -- hasGuiceServlet = BindingTargetVisitor.class.isInstance( ServletFinder.THIS ); -- } -- catch ( final LinkageError e ) -- { -- hasGuiceServlet = false; -- } -- HAS_GUICE_SERVLET = hasGuiceServlet; -- -- boolean hasJsr250Priority; -- try -- { -- hasJsr250Priority = javax.annotation.Priority.class.isAnnotation(); -- } -- catch ( final LinkageError e ) -- { -- hasJsr250Priority = false; -- } -- HAS_JSR250_PRIORITY = hasJsr250Priority; -- } -- -- // ---------------------------------------------------------------------- -- // Constants -- // ---------------------------------------------------------------------- -- -- private static final boolean HAS_GUICE_SERVLET; -- -- private static final boolean HAS_JSR250_PRIORITY; -- - // ---------------------------------------------------------------------- - // Constructors - // ---------------------------------------------------------------------- -@@ -105,8 +68,7 @@ final class Implementations - final boolean isPriority = Priority.class.equals( annotationType ); - - // peek behind servlet/filter extension bindings when checking priority, so we can order them by rank -- final Class implementation = -- binding.acceptTargetVisitor( HAS_GUICE_SERVLET && isPriority ? ServletFinder.THIS : ClassFinder.THIS ); -+ final Class implementation = binding.acceptTargetVisitor( ClassFinder.THIS ); - - T annotation = null; - if ( null != implementation ) -@@ -114,11 +76,7 @@ final class Implementations - annotation = implementation.getAnnotation( annotationType ); - if ( null == annotation ) - { -- if ( HAS_JSR250_PRIORITY && isPriority ) -- { -- annotation = adaptJsr250( binding, implementation ); -- } -- else if ( Description.class.equals( annotationType ) ) -+ if ( Description.class.equals( annotationType ) ) - { - annotation = adaptLegacy( binding, implementation ); - } -@@ -131,13 +89,6 @@ final class Implementations - // Implementation methods - // ---------------------------------------------------------------------- - -- @SuppressWarnings( "unchecked" ) -- private static T adaptJsr250( final Binding binding, final Class clazz ) -- { -- final javax.annotation.Priority jsr250 = clazz.getAnnotation( javax.annotation.Priority.class ); -- return null != jsr250 ? (T) new PrioritySource( binding.getSource(), jsr250.value() ) : null; -- } -- - @SuppressWarnings( { "unchecked", "deprecation" } ) - private static T adaptLegacy( final Binding binding, final Class clazz ) - { -@@ -215,45 +166,4 @@ final class Implementations - return binding.getPrivateElements().getInjector().getBinding( binding.getKey() ).acceptTargetVisitor( this ); - } - } -- -- /** -- * {@link ClassFinder} that can also peek behind servlet/filter bindings. -- */ -- static final class ServletFinder -- extends ClassFinder -- implements com.google.inject.servlet.ServletModuleTargetVisitor> -- { -- // ---------------------------------------------------------------------- -- // Constants -- // ---------------------------------------------------------------------- -- -- @SuppressWarnings( "hiding" ) -- static final BindingTargetVisitor> THIS = new ServletFinder(); -- -- // ---------------------------------------------------------------------- -- // Public methods -- // ---------------------------------------------------------------------- -- -- public Class visit( final com.google.inject.servlet.InstanceFilterBinding binding ) -- { -- return binding.getFilterInstance().getClass(); -- } -- -- public Class visit( final com.google.inject.servlet.InstanceServletBinding binding ) -- { -- return binding.getServletInstance().getClass(); -- } -- -- public Class visit( final com.google.inject.servlet.LinkedFilterBinding binding ) -- { -- // this assumes only one level of indirection: api-->impl -- return binding.getLinkedKey().getTypeLiteral().getRawType(); -- } -- -- public Class visit( final com.google.inject.servlet.LinkedServletBinding binding ) -- { -- // this assumes only one level of indirection: api-->impl -- return binding.getLinkedKey().getTypeLiteral().getRawType(); -- } -- } - } -diff --git a/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/space/QualifiedTypeBinder.java b/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/space/QualifiedTypeBinder.java -index 4b34436..d213e19 100644 ---- a/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/space/QualifiedTypeBinder.java -+++ b/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/space/QualifiedTypeBinder.java -@@ -39,32 +39,12 @@ import com.google.inject.name.Names; - public final class QualifiedTypeBinder - implements QualifiedTypeListener - { -- // ---------------------------------------------------------------------- -- // Static initialization -- // ---------------------------------------------------------------------- -- -- static -- { -- boolean hasJsr299Typed; -- try -- { -- hasJsr299Typed = javax.enterprise.inject.Typed.class.isAnnotation(); -- } -- catch ( final LinkageError e ) -- { -- hasJsr299Typed = false; -- } -- HAS_JSR299_TYPED = hasJsr299Typed; -- } -- - // ---------------------------------------------------------------------- - // Constants - // ---------------------------------------------------------------------- - - private static final TypeLiteral OBJECT_TYPE_LITERAL = TypeLiteral.get( Object.class ); - -- private static final boolean HAS_JSR299_TYPED; -- - // ---------------------------------------------------------------------- - // Implementation fields - // ---------------------------------------------------------------------- -@@ -377,14 +357,6 @@ public final class QualifiedTypeBinder - { - for ( Class c = clazz; null != c && c != Object.class; c = c.getSuperclass() ) - { -- if ( HAS_JSR299_TYPED ) -- { -- final javax.enterprise.inject.Typed typed = c.getAnnotation( javax.enterprise.inject.Typed.class ); -- if ( null != typed ) -- { -- return typed.value().length > 0 ? typed.value() : c.getInterfaces(); -- } -- } - final org.eclipse.sisu.Typed typed = c.getAnnotation( org.eclipse.sisu.Typed.class ); - if ( null != typed ) - { --- -2.21.0 - diff --git a/sisu.spec b/sisu.spec index 43bde96..6b5ede7 100644 --- a/sisu.spec +++ b/sisu.spec @@ -16,14 +16,16 @@ Source101: sisu-inject.pom Source102: sisu-plexus.pom Patch0: sisu-OSGi-import-guava.patch -Patch1: sisu-ignored-tests.patch -Patch2: sisu-osgi-api.patch - -Patch3: 0001-Remove-support-for-optional-features.patch +Patch2: sisu-ignored-tests.patch +Patch3: sisu-osgi-api.patch BuildRequires: maven-local BuildRequires: mvn(com.google.inject.extensions:guice-servlet) BuildRequires: mvn(com.google.inject:guice::no_aop:) +BuildRequires: mvn(javax.annotation:javax.annotation-api) +BuildRequires: %{?module_prefix}mvn(javax.enterprise:cdi-api) +BuildRequires: mvn(javax.inject:javax.inject) +BuildRequires: mvn(javax.servlet:servlet-api) BuildRequires: mvn(junit:junit) BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-classworlds) BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-component-annotations) @@ -51,9 +53,8 @@ cp %{SOURCE101} sisu-inject/pom.xml cp %{SOURCE102} sisu-plexus/pom.xml %patch0 -%patch1 %patch2 -%patch3 -p1 +%patch3 %pom_xpath_set -r /pom:project/pom:version %{version} @@ -62,11 +63,6 @@ cp %{SOURCE102} sisu-plexus/pom.xml %mvn_package : __noinstall %mvn_alias :org.eclipse.sisu.plexus org.sonatype.sisu:sisu-inject-plexus -%pom_remove_dep :javax.inject sisu-inject -%pom_remove_dep :cdi-api sisu-inject -%pom_remove_dep :javax.annotation-api sisu-inject -%pom_remove_dep :servlet-api sisu-inject - %build %mvn_build From f074da854db430bb6540f6844ed63dc15d0d1f6a Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Mon, 16 Sep 2019 11:05:31 +0200 Subject: [PATCH 10/15] Remove dependency on glassfish-servlet-api --- ...-dependency-on-glassfish-servlet-api.patch | 98 +++++++++++++++++++ sisu.spec | 5 +- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 0001-Remove-dependency-on-glassfish-servlet-api.patch diff --git a/0001-Remove-dependency-on-glassfish-servlet-api.patch b/0001-Remove-dependency-on-glassfish-servlet-api.patch new file mode 100644 index 0000000..a7f038e --- /dev/null +++ b/0001-Remove-dependency-on-glassfish-servlet-api.patch @@ -0,0 +1,98 @@ +From b14ee1ef509d9717eaa29e672282901847f2f735 Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Mon, 16 Sep 2019 10:48:10 +0200 +Subject: [PATCH] Remove dependency on glassfish-servlet-api + +--- + .../eclipse/sisu/inject/Implementations.java | 56 +------------------ + 1 file changed, 1 insertion(+), 55 deletions(-) + +diff --git a/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java b/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java +index 523c9b2..89db5da 100644 +--- a/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java ++++ b/sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java +@@ -38,17 +38,6 @@ final class Implementations + + static + { +- boolean hasGuiceServlet; +- try +- { +- hasGuiceServlet = BindingTargetVisitor.class.isInstance( ServletFinder.THIS ); +- } +- catch ( final LinkageError e ) +- { +- hasGuiceServlet = false; +- } +- HAS_GUICE_SERVLET = hasGuiceServlet; +- + boolean hasJsr250Priority; + try + { +@@ -65,8 +54,6 @@ final class Implementations + // Constants + // ---------------------------------------------------------------------- + +- private static final boolean HAS_GUICE_SERVLET; +- + private static final boolean HAS_JSR250_PRIORITY; + + // ---------------------------------------------------------------------- +@@ -106,7 +93,7 @@ final class Implementations + + // peek behind servlet/filter extension bindings when checking priority, so we can order them by rank + final Class implementation = +- binding.acceptTargetVisitor( HAS_GUICE_SERVLET && isPriority ? ServletFinder.THIS : ClassFinder.THIS ); ++ binding.acceptTargetVisitor( ClassFinder.THIS ); + + T annotation = null; + if ( null != implementation ) +@@ -215,45 +202,4 @@ final class Implementations + return binding.getPrivateElements().getInjector().getBinding( binding.getKey() ).acceptTargetVisitor( this ); + } + } +- +- /** +- * {@link ClassFinder} that can also peek behind servlet/filter bindings. +- */ +- static final class ServletFinder +- extends ClassFinder +- implements com.google.inject.servlet.ServletModuleTargetVisitor> +- { +- // ---------------------------------------------------------------------- +- // Constants +- // ---------------------------------------------------------------------- +- +- @SuppressWarnings( "hiding" ) +- static final BindingTargetVisitor> THIS = new ServletFinder(); +- +- // ---------------------------------------------------------------------- +- // Public methods +- // ---------------------------------------------------------------------- +- +- public Class visit( final com.google.inject.servlet.InstanceFilterBinding binding ) +- { +- return binding.getFilterInstance().getClass(); +- } +- +- public Class visit( final com.google.inject.servlet.InstanceServletBinding binding ) +- { +- return binding.getServletInstance().getClass(); +- } +- +- public Class visit( final com.google.inject.servlet.LinkedFilterBinding binding ) +- { +- // this assumes only one level of indirection: api-->impl +- return binding.getLinkedKey().getTypeLiteral().getRawType(); +- } +- +- public Class visit( final com.google.inject.servlet.LinkedServletBinding binding ) +- { +- // this assumes only one level of indirection: api-->impl +- return binding.getLinkedKey().getTypeLiteral().getRawType(); +- } +- } + } +-- +2.21.0 + diff --git a/sisu.spec b/sisu.spec index 6b5ede7..5e6fa4c 100644 --- a/sisu.spec +++ b/sisu.spec @@ -18,6 +18,7 @@ Source102: sisu-plexus.pom Patch0: sisu-OSGi-import-guava.patch Patch2: sisu-ignored-tests.patch Patch3: sisu-osgi-api.patch +Patch4: 0001-Remove-dependency-on-glassfish-servlet-api.patch BuildRequires: maven-local BuildRequires: mvn(com.google.inject.extensions:guice-servlet) @@ -25,7 +26,6 @@ BuildRequires: mvn(com.google.inject:guice::no_aop:) BuildRequires: mvn(javax.annotation:javax.annotation-api) BuildRequires: %{?module_prefix}mvn(javax.enterprise:cdi-api) BuildRequires: mvn(javax.inject:javax.inject) -BuildRequires: mvn(javax.servlet:servlet-api) BuildRequires: mvn(junit:junit) BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-classworlds) BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-component-annotations) @@ -55,6 +55,9 @@ cp %{SOURCE102} sisu-plexus/pom.xml %patch0 %patch2 %patch3 +%patch4 -p1 + +%pom_remove_dep :servlet-api sisu-inject %pom_xpath_set -r /pom:project/pom:version %{version} From e774b6ac2c6309a3a512814723387a44c46af6d1 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 5 Nov 2019 17:29:28 +0100 Subject: [PATCH 11/15] Mass rebuild for javapackages-tools 201902 --- sisu.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sisu.spec b/sisu.spec index 5e6fa4c..11a2d5a 100644 --- a/sisu.spec +++ b/sisu.spec @@ -1,6 +1,6 @@ Name: sisu Version: 0.3.3 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Eclipse dependency injection framework # sisu is EPL-1.0 # bundled asm is BSD @@ -76,6 +76,9 @@ cp %{SOURCE102} sisu-plexus/pom.xml %license sisu-inject/LICENSE.txt %changelog +* Tue Nov 05 2019 Mikolaj Izdebski - 0.3.3-9 +- Mass rebuild for javapackages-tools 201902 + * Fri Jun 28 2019 Mikolaj Izdebski - 1:0.3.3-8 - Merge inject and plexus subpackages From a9ccd00df575311fbcf727dd5b2d7d8b78e92953 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Wed, 6 Nov 2019 18:20:37 +0100 Subject: [PATCH 12/15] Update to upstream version 0.3.4 --- .gitignore | 2 ++ sisu.spec | 11 +++++++---- sources | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index d47f8e6..e7fb9c3 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ /org.eclipse.sisu.plexus-0.3.2.tar.bz2 /org.eclipse.sisu.inject-0.3.3.tar.bz2 /org.eclipse.sisu.plexus-0.3.3.tar.bz2 +/org.eclipse.sisu.inject-0.3.4.tar.gz +/org.eclipse.sisu.plexus-0.3.4.tar.gz diff --git a/sisu.spec b/sisu.spec index 11a2d5a..9390922 100644 --- a/sisu.spec +++ b/sisu.spec @@ -1,6 +1,6 @@ Name: sisu -Version: 0.3.3 -Release: 9%{?dist} +Version: 0.3.4 +Release: 1%{?dist} Summary: Eclipse dependency injection framework # sisu is EPL-1.0 # bundled asm is BSD @@ -8,8 +8,8 @@ License: EPL-1.0 and BSD URL: http://eclipse.org/sisu BuildArch: noarch -Source0: http://git.eclipse.org/c/sisu/org.eclipse.sisu.inject.git/snapshot/releases/%{version}.tar.bz2#/org.eclipse.sisu.inject-%{version}.tar.bz2 -Source1: http://git.eclipse.org/c/sisu/org.eclipse.sisu.plexus.git/snapshot/releases/%{version}.tar.bz2#/org.eclipse.sisu.plexus-%{version}.tar.bz2 +Source0: http://git.eclipse.org/c/sisu/org.eclipse.sisu.inject.git/snapshot/releases/%{version}.tar.gz#/org.eclipse.sisu.inject-%{version}.tar.gz +Source1: http://git.eclipse.org/c/sisu/org.eclipse.sisu.plexus.git/snapshot/releases/%{version}.tar.gz#/org.eclipse.sisu.plexus-%{version}.tar.gz Source100: sisu-parent.pom Source101: sisu-inject.pom @@ -76,6 +76,9 @@ cp %{SOURCE102} sisu-plexus/pom.xml %license sisu-inject/LICENSE.txt %changelog +* Wed Nov 06 2019 Mikolaj Izdebski - 0.3.4-1 +- Update to upstream version 0.3.4 + * Tue Nov 05 2019 Mikolaj Izdebski - 0.3.3-9 - Mass rebuild for javapackages-tools 201902 diff --git a/sources b/sources index 42ec4e9..944c21c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (org.eclipse.sisu.inject-0.3.3.tar.bz2) = 5c99bba3bb9698394c76715c6f917f51041f9bc1f1c34b7036213a4a826746f5252c70def58283b75b97da1ecaba0e38704a46b8b993a1d54814e2e2050b15e0 -SHA512 (org.eclipse.sisu.plexus-0.3.3.tar.bz2) = e9e73d51abbbdbd18a739650aa4f7ab084bd47de711d9ba1db107f054bdeac358a4dbc5ab6e050f86aca1f3e16dcef99c14bc93dc297039d7f986afe95fd71ce +SHA512 (org.eclipse.sisu.inject-0.3.4.tar.gz) = 317a63ddea93b8ed2a1c6c878bc9171c2b1b00a8f7b8a39f0a993359efe5b8657d72a78b3608b208f7e6b7b7b2186c4adf57d05b8ad294631d05a3b378dd6a24 +SHA512 (org.eclipse.sisu.plexus-0.3.4.tar.gz) = 49bbbc7479e3be7a87b6d69f94e6bd004a78b8d02d41581e9315c9229728e2e531495bedffff94cb05bc8cbdb5ac6672cc14d5925844db05b199e07d1c9751e5 From edb4ad54b63ba3b50ed01f64ccff0e13e6160874 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 25 Jan 2020 14:40:08 +0100 Subject: [PATCH 13/15] Build with OpenJDK 8 --- sisu.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sisu.spec b/sisu.spec index 9390922..8d9d2a2 100644 --- a/sisu.spec +++ b/sisu.spec @@ -1,6 +1,6 @@ Name: sisu Version: 0.3.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Eclipse dependency injection framework # sisu is EPL-1.0 # bundled asm is BSD @@ -20,7 +20,7 @@ Patch2: sisu-ignored-tests.patch Patch3: sisu-osgi-api.patch Patch4: 0001-Remove-dependency-on-glassfish-servlet-api.patch -BuildRequires: maven-local +BuildRequires: maven-local-openjdk8 BuildRequires: mvn(com.google.inject.extensions:guice-servlet) BuildRequires: mvn(com.google.inject:guice::no_aop:) BuildRequires: mvn(javax.annotation:javax.annotation-api) @@ -76,6 +76,9 @@ cp %{SOURCE102} sisu-plexus/pom.xml %license sisu-inject/LICENSE.txt %changelog +* Sat Jan 25 2020 Mikolaj Izdebski - 0.3.4-2 +- Build with OpenJDK 8 + * Wed Nov 06 2019 Mikolaj Izdebski - 0.3.4-1 - Update to upstream version 0.3.4 From b6f2de5abf36107618b311be8e48c13397a047ac Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 16 Apr 2021 15:33:13 +0200 Subject: [PATCH 14/15] Conditionalize buildrequires in bootstrap mode --- sisu.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sisu.spec b/sisu.spec index 8d9d2a2..e1711df 100644 --- a/sisu.spec +++ b/sisu.spec @@ -1,3 +1,5 @@ +%bcond_without bootstrap + Name: sisu Version: 0.3.4 Release: 2%{?dist} @@ -21,6 +23,9 @@ Patch3: sisu-osgi-api.patch Patch4: 0001-Remove-dependency-on-glassfish-servlet-api.patch BuildRequires: maven-local-openjdk8 +%if %{with bootstrap} +BuildRequires: javapackages-bootstrap +%else BuildRequires: mvn(com.google.inject.extensions:guice-servlet) BuildRequires: mvn(com.google.inject:guice::no_aop:) BuildRequires: mvn(javax.annotation:javax.annotation-api) @@ -33,6 +38,7 @@ BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-utils) BuildRequires: mvn(org.osgi:osgi.core) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.testng:testng) +%endif Provides: bundled(objectweb-asm) From 7bc9c9a52b3853e4f3ec339d4797e17ebb1d7cbb Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 13 May 2021 19:08:43 +0200 Subject: [PATCH 15/15] Turn off bootstrap mode by default --- sisu.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sisu.spec b/sisu.spec index e1711df..4823313 100644 --- a/sisu.spec +++ b/sisu.spec @@ -1,4 +1,4 @@ -%bcond_without bootstrap +%bcond_with bootstrap Name: sisu Version: 0.3.4