This commit is contained in:
parent
c021b1062f
commit
2acc3ceb66
84
sisu-no-dependency-on-glassfish-servlet-api.patch
Normal file
84
sisu-no-dependency-on-glassfish-servlet-api.patch
Normal file
@ -0,0 +1,84 @@
|
||||
--- sisu-inject/org.eclipse.sisu.inject/src/org/eclipse/sisu/inject/Implementations.java
|
||||
+++ 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<Object, Class<?>>
|
||||
- {
|
||||
- // ----------------------------------------------------------------------
|
||||
- // Constants
|
||||
- // ----------------------------------------------------------------------
|
||||
-
|
||||
- @SuppressWarnings( "hiding" )
|
||||
- static final BindingTargetVisitor<Object, Class<?>> 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();
|
||||
- }
|
||||
- }
|
||||
}
|
@ -31,6 +31,7 @@ Source2: %{name}-build.tar.xz
|
||||
Source100: %{name}-inject.pom
|
||||
Source101: %{name}-plexus.pom
|
||||
Patch0: %{name}-OSGi-import-guava.patch
|
||||
Patch1: %{name}-no-dependency-on-glassfish-servlet-api.patch
|
||||
Patch2: %{name}-ignored-tests.patch
|
||||
Patch3: %{name}-osgi-api.patch
|
||||
BuildRequires: ant
|
||||
@ -91,9 +92,12 @@ cp %{SOURCE100} sisu-inject/pom.xml
|
||||
cp %{SOURCE101} sisu-plexus/pom.xml
|
||||
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
|
||||
%pom_remove_dep :servlet-api sisu-inject
|
||||
|
||||
for i in inject plexus; do
|
||||
%pom_xpath_set -r /pom:project/pom:version %{version} %{name}-${i}
|
||||
done
|
||||
@ -106,7 +110,6 @@ done
|
||||
mkdir -p lib
|
||||
build-jar-repository -s lib \
|
||||
glassfish-annotation-api \
|
||||
glassfish-servlet-api \
|
||||
google-guice-no_aop \
|
||||
guice/guice-servlet \
|
||||
javax.enterprise.inject/cdi-api \
|
||||
|
Loading…
Reference in New Issue
Block a user