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

Jean-Baptiste Onofré commented on KARAF-4285:
---------------------------------------------

It works fine with Karaf 4.2.2-SNAPSHOT.

I tested the following feature:

{code}
<?xml version="1.0" encoding="UTF-8"?>
<features name="test-features" 
xmlns="http://karaf.apache.org/xmlns/features/v1.3.0";>

    <feature name="test-conditional" version="1.0-SNAPSHOT">
        <bundle>mvn:commons-lang/commons-lang/2.6</bundle>
    </feature>

    <feature name="foo" version="1.0-SNAPSHOT">
        <bundle>mvn:commons-pool/commons-pool/1.6</bundle>
    </feature>

    <feature name="main-feature" version="1.0-SNAPSHOT">
        <conditional>
            <condition>foo</condition>
            <feature>test-conditional</feature>
        </conditional>
        <bundle>mvn:commons-digester/commons-digester/2.1</bundle>
    </feature>

</features>
{code}

and the following the assembly like {{pom.xml}}:

{code}
...
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <version>4.2.2-SNAPSHOT</version>
                <executions>
                    <execution>
                        <id>features-add-to-repo</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>features-add-to-repository</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                
<descriptor>mvn:net.nanthrax.test/test-feature/${project.version}/xml</descriptor>
                            </descriptors>
                            <features>
                                <feature>foo</feature>
                                <feature>main-feature</feature>
                            </features>
                            <repository>target/features-repo</repository>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
...
{code}

I can see {{commons-pool}} bundle in {{target/features-repo}}.

I'm testing with 4.1.7-SNAPSHOT as well.

> features-add-to-repository ignore conditional features
> ------------------------------------------------------
>
>                 Key: KARAF-4285
>                 URL: https://issues.apache.org/jira/browse/KARAF-4285
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.0.4
>            Reporter: J. Brébec
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: 4.0.11, 4.2.2, 4.1.7
>
>
> when a feature declare a "conditional feature", the goal 
> features-add-to-repository doesn't add this conditional feature in the target 
> repository.
> by exemple :
> <feature name="opt">
>   <bundle>A</bundle>
> </feature>
> <feature name="main">
>   <conditional>
>     <condition>shell</condition>
>     <feature>opt</feature>
>   </conditional>
> </feature>
> then if i try to package "main" and "shell", then the bundle A is never 
> copyed to the repository



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

Reply via email to