You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Gary Gilchrist (JIRA)" <ji...@apache.org> on 2013/11/29 23:23:35 UTC

[jira] [Commented] (KARAF-2357) features-create-kar goal of the karaf-maven-plugin ignores bundles listed in the features that have the "dependency" property set to "true"

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

Gary Gilchrist commented on KARAF-2357:
---------------------------------------

Hi - I am also using the karaf-maven-plugin to create an assembly (using the new "karaf-assembly" packaging) and I see this problem too.

The new configuration flag for the features-create-kar goal would only work, I think, in a POM that uses the features-create-kar goal to create a KAR based on a features.xml. But not when you are creating an assembly from a list of features passed as configuration to the karaf-maven-plugin, as with the <bootFeatures> example at http://karaf.apache.org/manual/latest/developers-guide/custom-distribution.html.

Would this be a different bug, or is there a way to still use the configuration flag when generating an assembly?

> features-create-kar goal of the karaf-maven-plugin ignores bundles listed in the features that have the "dependency" property set to "true"
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KARAF-2357
>                 URL: https://issues.apache.org/jira/browse/KARAF-2357
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-tooling
>    Affects Versions: 3.0.0
>            Reporter: Nick Smith
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>              Labels: karaf-maven-plugin
>             Fix For: 2.3.2, 2.4.0, 3.0.0
>
>
> Use case :
> I'm using the 'karaf-assembly' goal of the karaf-maven-plugin to create a "standalone" karaf distribution with all required dependencies stored in the system repo. 
> Note: the karaf-assembly-goal depends on the features-create-kar goal which is where the resolving of the feature is performed.
> When the "scr" feature was added to the list of features to be installed only the event admin and SCR command-line bundles got added to the assembly's system repo and not the SCR runtime.
> Looking at the Karaf features file (below) the "missing" dependencies have the "dependency" property set to "true". If I understand correctly, this flag marks the artifact's capabilities to be resolved from an OBR.
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="standard-3.0.0-SNAPSHOT">
>     <repository>mvn:org.ops4j.pax.web/pax-web-features/3.0.1/xml/features</repository>
> ...
>     <feature name="scr" version="3.0.0-SNAPSHOT" description="Declarative Service support" resolver="(obr)">
>         <feature>eventadmin</feature>
>         <bundle start-level="30" dependency="true">mvn:org.apache.felix/org.apache.felix.metatype/1.0.6</bundle>
>         <bundle start-level="30" dependency="true">mvn:org.apache.felix/org.apache.felix.scr/1.6.2</bundle>
>         <bundle start-level="30">mvn:org.apache.karaf.scr/org.apache.karaf.scr.command/3.0.0-SNAPSHOT</bundle>
>         <conditional>
>             <condition>management</condition>
>             <bundle start-level="30">mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/3.0.0-SNAPSHOT</bundle>
>         </conditional>
>         <conditional>
>             <condition>webconsole</condition>
>             <bundle start-level="30">mvn:org.apache.felix/org.apache.felix.webconsole.plugins.ds/1.0.0</bundle>
>         </conditional>
>     </feature>
> ...
> </features>
> For me there are (at least) three options to resolve this issue.
> # Issue a warning that the feature has not be completely installed.
> # Add a flag to the features-create-kar goal to ignore the "dependency" flag.
> # Add some (undefined) OBR resolving capability to fetch the "best" bundle.
> I've successfully tested option 2 and can submit a patch if someone can suggest what the plugin parameter should be called.



--
This message was sent by Atlassian JIRA
(v6.1#6144)