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

ASF GitHub Bot commented on FELIX-6030:
---------------------------------------

GitHub user jbonofre opened a pull request:

    https://github.com/apache/felix/pull/167

    [FELIX-6030] Remove @Header on Gogo JLine Activator to avoid issue in 
Apache Karaf shell

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jbonofre/felix FELIX-6030

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/felix/pull/167.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #167
    
----
commit b8468b585a4d3b806cd0f2305b27c92b10b00473
Author: Jean-Baptiste Onofré <jbonofre@...>
Date:   2019-01-22T14:16:14Z

    [FELIX-6030] Remove @Header on Gogo JLine Activator to avoid issue in 
Apache Karaf shell

----


> @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
>             Fix For: gogo.jline-1.1.3
>
>
> 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)

Reply via email to