You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Fabian Lange (JIRA)" <ji...@apache.org> on 2016/01/10 18:00:40 UTC

[jira] [Comment Edited] (KARAF-4255) karaf-maven-plugin does include unused feature conditional dependencies in assembly

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

Fabian Lange edited comment on KARAF-4255 at 1/10/16 4:59 PM:
--------------------------------------------------------------

I am using 
{code}
<ignoreDependencyFlag>false</ignoreDependencyFlag>
{code}
which will cause it to install the bundle regardless of it being marked a dependency.
I could not use it, but that would not change much because they are not marked as dependency

Also the runtime aspect seems to also be handling it not as true conditional either

(just also verified with ignoreDependency=true -> same behaviour. I get the webconsole bundle installed through scr


was (Author: fabianlange):
I am using 
{code}
<ignoreDependencyFlag>false</ignoreDependencyFlag>
{code}
which will cause it to install the bundle regardless of it being marked a dependency.
I could not use it, but that would not change much because they are not marked as dependency

Also the runtime aspect seems to also be handling it not as true conditional either

> karaf-maven-plugin does include unused feature conditional dependencies in assembly
> -----------------------------------------------------------------------------------
>
>                 Key: KARAF-4255
>                 URL: https://issues.apache.org/jira/browse/KARAF-4255
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 4.0.3
>            Reporter: Fabian Lange
>            Assignee: Jean-Baptiste Onofré
>
> I am using karaf-maven-plugin to make a custom assembly.
> I do include SCR, but I do not include webconsole.
> When I look into the system folder of my generated assembly, I can see:
> {code}
> target/assembly/system/org/apache/felix/org.apache.felix.webconsole.plugins.ds/2.0.2/org.apache.felix.webconsole.plugins.ds-2.0.2.jar
> {code}
> this correlates to the maven output:
> {code}
> [INFO] Feature scr is defined as a boot feature
> [INFO] == Installing artifact mvn:org.apache.karaf.scr/org.apache.karaf.scr.command/4.0.3
> [INFO] == Installing artifact mvn:org.apache.felix/org.apache.felix.scr/2.0.2
> [INFO] == Installing artifact mvn:org.apache.felix/org.apache.felix.scr.compat/1.0.2
> [INFO] == Installing artifact mvn:org.apache.felix/org.apache.felix.webconsole.plugins.ds/2.0.2
> [INFO] == Installing artifact mvn:org.apache.felix/org.apache.felix.metatype/1.1.2
> [INFO] == Installing artifact mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/4.0.3
> {code}
> however looking at: https://github.com/apache/karaf/blob/master/assemblies/features/standard/src/main/feature/feature.xml#L524
> you can see that this is an conditional dependency only.
> This is caused by the fact that assembly does not check if the conditional had been met:
> https://github.com/apache/karaf/blob/master/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java#L822
> I believe we need a check for the conditionals wether the condition is actually met.



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