You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Raymond Augé (JIRA)" <ji...@apache.org> on 2019/01/16 14:19:00 UTC

[jira] [Commented] (FELIX-6030) @Header in gogo.jline causing maven-bundle-plugin failure

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

Raymond Augé commented on FELIX-6030:
-------------------------------------

Sigh... I suppose you can remove it. I hope this type of issue doesn't go far into many bundles in Karaf, particularly as bundle annotations become more prolific.

> @Header in gogo.jline causing maven-bundle-plugin failure
> ---------------------------------------------------------
>
>                 Key: FELIX-6030
>                 URL: https://issues.apache.org/jira/browse/FELIX-6030
>             Project: Felix
>          Issue Type: Bug
>          Components: Gogo JLine
>    Affects Versions: gogo.jline-1.1.2
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>
> In the https://svn.apache.org/viewvc?view=revision&revision=1849343 revision, Gogo JLine bundle {{Activator}} now contains:
> {code}
> @Header(name = Constants.BUNDLE_ACTIVATOR, value = "${@class}")
> {code}
> In Karaf, we "wrap" {{gogo.jline}} in Karaf {{shell.core}}:
> {code}
>             <plugin>
>                 <groupId>org.apache.felix</groupId>
>                 <artifactId>maven-bundle-plugin</artifactId>
>                 <configuration>
>                     <instructions>
>                         <Import-Package>
>                             org.osgi.service.event;resolution:=optional,
>                             org.apache.karaf.branding;resolution:=optional,
>                             !org.apache.felix.gogo.jline*,
>                             !org.apache.sshd.*,
>                             *   
>                         </Import-Package>
>                         <Export-Package>
>                             org.apache.karaf.shell.api.*;version=${project.version},
>                             org.apache.karaf.shell.support.*;version=${project.version},
>                             org.apache.felix.service.command,
>                             org.apache.felix.service.threadio
>                         </Export-Package>
>                         <Private-Package>
>                             org.apache.karaf.service.guard.tools,
>                             org.apache.karaf.shell.impl.*,
>                             org.apache.karaf.util,
>                             org.apache.karaf.util.filesstream,
>                             org.apache.karaf.util.jaas,
>                             org.apache.karaf.util.tracker,
>                             org.apache.felix.utils.properties,
>                             org.apache.felix.utils.extender,
>                             org.apache.felix.utils.manifest,
>                             org.apache.felix.gogo.jline,
>                             org.apache.felix.gogo.runtime,
>                             org.apache.felix.gogo.runtime.threadio,
>                             org.apache.felix.service.command,
>                             org.apache.felix.service.threadio,
>                         </Private-Package>
>                         <Provide-Capability>
>                             osgi.service;effective:=active;objectClass=org.apache.karaf.shell.api.console.SessionFactory
>                         </Provide-Capability>
>                         <Bundle-Activator>
>                             org.apache.karaf.shell.impl.console.osgi.Activator
>                         </Bundle-Activator>
>                         <Main-Class>
>                             org.apache.karaf.shell.impl.console.standalone.Main
>                         </Main-Class>
>                     </instructions>
>                     <unpackBundle>true</unpackBundle>
>                 </configuration>
>             </plugin>
> {code}
> Since the introduction of {{@Header}} in Felix Gogo JLine, the build fails with:
> {code}
> [ERROR] Bundle org.apache.karaf.shell:org.apache.karaf.shell.core:bundle:4.2.3-SNAPSHOT : The Bundle-Activator header only supports a single type. The following types were found: org.apache.karaf.shell.impl.console.osgi.Activator,org.apache.felix.gogo.jline.Activator. This usually happens when a macro resolves to multiple types
> [ERROR] Error(s) found in bundle configuration
> {code}
> [~rotty3000] do you know a workaround in the {{maven-bundle-plugin}} about that ? If not, do you mind if I remove {{@Header}} from Gogo JLine Activator ?
> Thanks.
> JB



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)