camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Cosentino (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-9463) Camel-guice OSGi dependency resolution fails
Date Thu, 31 Dec 2015 10:54:49 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-9463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15075891#comment-15075891
] 

Andrea Cosentino commented on CAMEL-9463:
-----------------------------------------

It seems the bundle produced by Google with Maven-bundle-plugin exclude *.internal from being
exported.

>From the latest codebase this is the Manifest:

{code}
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: oscerd
Build-Jdk: 1.7.0_79
Export-Package: com.google.inject.name;version="1.4",com.google.inject
 .binder;version="1.4",com.google.inject.spi;version="1.4",com.google.
 inject.matcher;version="1.4",com.google.inject.util;version="1.4",com
 .google.inject;version="1.4"
Bundle-Name: guice
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Copyright: Copyright (C) 2006 Google Inc.
Bundle-Vendor: Google, Inc.
Bundle-Version: 4.0.1.SNAPSHOT
Bundle-ManifestVersion: 2
Bundle-Description: Guice is a lightweight dependency injection framew
 ork for Java 6 and above
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-DocURL: https://github.com/google/guice
Import-Package: com.google.common.base;version="18.0",com.google.commo
 n.cache;version="18.0",com.google.common.collect;version="18.0",javax
 .inject,org.aopalliance.intercept
Bundle-SymbolicName: com.google.inject
Eclipse-ExtensibleAPI: true
{code}

And this is the configuration of Maven bundle plugin:

{code}
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>2.1.0</version>
          <configuration>
            <instructions>
                .
                .
                .
              <Import-Package>!com.google.inject.*,*</Import-Package>
              <_exportcontents>!*.internal.*,$(module).*;version=${guice.api.version}</_exportcontents>
              <_versionpolicy>$(version;==;$(@))</_versionpolicy>
              <_nouses>true</_nouses>
              <_removeheaders>
                Embed-Dependency,Embed-Transitive,
                Built-By,Tool,Created-By,Build-Jdk,
                Originally-Created-By,Archiver-Version,
                Include-Resource,Private-Package,
                Ignore-Package,Bnd-LastModified
              </_removeheaders>
            </instructions>
          </configuration>
           .
           .
           .
        </plugin>
{code}

Maybe we can release our own version of Guice 4.0 as Servicemix bundle. [~davsclaus], [~jbonofre]
what do you think about? I can work on the bundle and submit a PR for this.

> Camel-guice OSGi dependency resolution fails
> --------------------------------------------
>
>                 Key: CAMEL-9463
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9463
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-guice
>    Affects Versions: 2.16.1
>         Environment: Karaf 3.0.5 / 4.0.3
>            Reporter: Frédérik ROULEAU
>            Priority: Minor
>              Labels: karaf, osgi
>
> Camel-guice feature file says it requires com.google.inject/guice/4.0. That bundle do
not export com.google.inject.internal.* classes that are required by camel-guice bundle. This
leads to the error:
> Unsatisfied requirement(s):
> ---------------------------
>    package:(&(package=com.google.inject.internal)(version>=1.2.0)(!(version>=4.0.0)))
> In version 2.15, camel-guice feature was installing guice from service-mix bundle which
was exporting the com.google.inject.internal package.
> It seems that there is no equivalent  ServiceMix  version for guice-4



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message