You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Ioannis Canellos (JIRA)" <ji...@apache.org> on 2012/08/13 14:07:37 UTC

[jira] [Created] (KARAF-1718) Add support for support for conditional bundle and feature definition inside features

Ioannis Canellos created KARAF-1718:
---------------------------------------

             Summary: Add support for support for conditional bundle and feature definition inside features
                 Key: KARAF-1718
                 URL: https://issues.apache.org/jira/browse/KARAF-1718
             Project: Karaf
          Issue Type: New Feature
    Affects Versions: 2.3.0, 3.1.0
            Reporter: Ioannis Canellos


There have been many talks in the past about modifying the feature service so that it can install bundles/features/configuration when some special conditions are meet.

I am attaching a patch which allows the user to define an additional subelement under the feature element, that defines such conditions and what should be installed when the conditions are meet.

A simple example:

    <feature name="scr" description="Declarative Service support" version="${project.version}" resolver="(obr)">
        <feature>eventadmin</feature>
        <bundle dependency="true" start-level="30">mvn:org.apache.felix/org.apache.felix.metatype/${felix.metatype.version}</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.felix/org.apache.felix.scr/${felix.scr.version}</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.scr/org.apache.karaf.scr.command/${project.version}</bundle>
        <conditional>
            <condition>management</condition>
            <bundle start-level="30">mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/${project.version}</bundle>
        </conditional>
    </feature>



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KARAF-1718) Add support for support for conditional bundle and feature definition inside features

Posted by "Ioannis Canellos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ioannis Canellos updated KARAF-1718:
------------------------------------

    Attachment: KARAF-1718.patch.txt

Attaching the patch. It will require some additional tuning, but this is mostly to give an idea of what I have in mind.
                
> Add support for support for conditional bundle and feature definition inside features
> -------------------------------------------------------------------------------------
>
>                 Key: KARAF-1718
>                 URL: https://issues.apache.org/jira/browse/KARAF-1718
>             Project: Karaf
>          Issue Type: New Feature
>    Affects Versions: 2.3.0, 3.1.0
>            Reporter: Ioannis Canellos
>         Attachments: KARAF-1718.patch.txt
>
>
> There have been many talks in the past about modifying the feature service so that it can install bundles/features/configuration when some special conditions are meet.
> I am attaching a patch which allows the user to define an additional subelement under the feature element, that defines such conditions and what should be installed when the conditions are meet.
> A simple example:
>     <feature name="scr" description="Declarative Service support" version="${project.version}" resolver="(obr)">
>         <feature>eventadmin</feature>
>         <bundle dependency="true" start-level="30">mvn:org.apache.felix/org.apache.felix.metatype/${felix.metatype.version}</bundle>
>         <bundle dependency="true" start-level="30">mvn:org.apache.felix/org.apache.felix.scr/${felix.scr.version}</bundle>
>         <bundle start-level="30">mvn:org.apache.karaf.scr/org.apache.karaf.scr.command/${project.version}</bundle>
>         <conditional>
>             <condition>management</condition>
>             <bundle start-level="30">mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/${project.version}</bundle>
>         </conditional>
>     </feature>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KARAF-1718) Add support for support for conditional bundle and feature definition inside features

Posted by "Andrei Pozolotin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436992#comment-13436992 ] 

Andrei Pozolotin commented on KARAF-1718:
-----------------------------------------

Ioannis: can you please piggyback [KARAF-1738] as part of this? thanks, Andrei.
                
> Add support for support for conditional bundle and feature definition inside features
> -------------------------------------------------------------------------------------
>
>                 Key: KARAF-1718
>                 URL: https://issues.apache.org/jira/browse/KARAF-1718
>             Project: Karaf
>          Issue Type: New Feature
>    Affects Versions: 2.3.0, 3.1.0
>            Reporter: Ioannis Canellos
>         Attachments: KARAF-1718.patch.txt
>
>
> There have been many talks in the past about modifying the feature service so that it can install bundles/features/configuration when some special conditions are meet.
> I am attaching a patch which allows the user to define an additional subelement under the feature element, that defines such conditions and what should be installed when the conditions are meet.
> A simple example:
>     <feature name="scr" description="Declarative Service support" version="${project.version}" resolver="(obr)">
>         <feature>eventadmin</feature>
>         <bundle dependency="true" start-level="30">mvn:org.apache.felix/org.apache.felix.metatype/${felix.metatype.version}</bundle>
>         <bundle dependency="true" start-level="30">mvn:org.apache.felix/org.apache.felix.scr/${felix.scr.version}</bundle>
>         <bundle start-level="30">mvn:org.apache.karaf.scr/org.apache.karaf.scr.command/${project.version}</bundle>
>         <conditional>
>             <condition>management</condition>
>             <bundle start-level="30">mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/${project.version}</bundle>
>         </conditional>
>     </feature>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KARAF-1718) Add support for support for conditional bundle and feature definition inside features

Posted by "Andreas Pieber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463891#comment-13463891 ] 

Andreas Pieber commented on KARAF-1718:
---------------------------------------

keep old behavior of bundle start order:

Committing to https://svn.apache.org/repos/asf/karaf/trunk ...
        M       features/core/src/test/java/org/apache/karaf/features/FeaturesServiceTest.java
        M       features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
Committed r1390556

                
> Add support for support for conditional bundle and feature definition inside features
> -------------------------------------------------------------------------------------
>
>                 Key: KARAF-1718
>                 URL: https://issues.apache.org/jira/browse/KARAF-1718
>             Project: Karaf
>          Issue Type: New Feature
>    Affects Versions: 2.3.0, 3.1.0
>            Reporter: Ioannis Canellos
>         Attachments: KARAF-1718.patch.txt
>
>
> There have been many talks in the past about modifying the feature service so that it can install bundles/features/configuration when some special conditions are meet.
> I am attaching a patch which allows the user to define an additional subelement under the feature element, that defines such conditions and what should be installed when the conditions are meet.
> A simple example:
>     <feature name="scr" description="Declarative Service support" version="${project.version}" resolver="(obr)">
>         <feature>eventadmin</feature>
>         <bundle dependency="true" start-level="30">mvn:org.apache.felix/org.apache.felix.metatype/${felix.metatype.version}</bundle>
>         <bundle dependency="true" start-level="30">mvn:org.apache.felix/org.apache.felix.scr/${felix.scr.version}</bundle>
>         <bundle start-level="30">mvn:org.apache.karaf.scr/org.apache.karaf.scr.command/${project.version}</bundle>
>         <conditional>
>             <condition>management</condition>
>             <bundle start-level="30">mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/${project.version}</bundle>
>         </conditional>
>     </feature>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira