Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-368

Add "conflicts" configuration into features.xml

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • karaf
    • None

    Description

      I'm coding at pax-wicket right now and find the following "problem":

      In the following features.xml...

        <!-- Departmentstore example suite provided with paxwicket -->
        <feature name="departmentstore" version="0.6.0-SNAPSHOT">
          <feature version="0.6.0-SNAPSHOT">web</feature>
          <bundle>mvn:org.ops4j.pax.wicket.samples.departmentstore/departmentstore-model/0.6.0-SNAPSHOT</bundle>
          <bundle>mvn:org.ops4j.pax.wicket.samples.departmentstore.view/departmentstore-view-about/0.6.0-SNAPSHOT</bundle>
          <bundle>mvn:org.ops4j.pax.wicket.samples.departmentstore.view/departmentstore-view-application/0.6.0-SNAPSHOT</bundle>
          <bundle>mvn:org.ops4j.pax.wicket.samples.departmentstore.view/departmentstore-view-floor/0.6.0-SNAPSHOT</bundle>
          <bundle>mvn:org.ops4j.pax.wicket.samples.departmentstore.view/departmentstore-view-franchisee/0.6.0-SNAPSHOT</bundle>
        </feature>
        <feature name="departmentstore-basic" version="0.6.0-SNAPSHOT">
          <feature version="0.6.0-SNAPSHOT">web</feature>
          <bundle>mvn:org.ops4j.pax.wicket.samples.departmentstore/departmentstore-service-basic/0.6.0-SNAPSHOT</bundle>
        </feature>
        <feature name="departmentstore-alternative" version="0.6.0-SNAPSHOT">
          <feature version="0.6.0-SNAPSHOT">web</feature>
          <bundle>mvn:org.ops4j.pax.wicket.samples.departmentstore/departmentstore-service-alternative/0.6.0-SNAPSHOT</bundle>
        </feature>
      

      ... I have the problem that both, departmentstore-basic and departmentstore-alternative depend on web AND departmentstore; but they "conflict" with each other. I know that we can't detect such a situation automatically BUT it would be cool to do something like the following

        <feature name="departmentstore-basic" version="0.6.0-SNAPSHOT">
          <feature version="0.6.0-SNAPSHOT">web</feature>
          <feature version="0.6.0-SNAPSHOT" conflicts=true>departmentstore-alternative</feature>
          <bundle>mvn:org.ops4j.pax.wicket.samples.departmentstore/departmentstore-service-basic/0.6.0-SNAPSHOT</bundle>
        </feature>
        <feature name="departmentstore-alternative" version="0.6.0-SNAPSHOT">
          <feature version="0.6.0-SNAPSHOT">web</feature>
          <feature version="0.6.0-SNAPSHOT" conflicts=true>departmentstore-basic</feature>
          <bundle>mvn:org.ops4j.pax.wicket.samples.departmentstore/departmentstore-service-alternative/0.6.0-SNAPSHOT</bundle>
        </feature>
      

      If I have departmentstore-basic install now and I do a...

      feature:install departmentstore-alternative
      

      ...something like the following should happen automatically...

      features:uninstall departmentstore-basic
      features:install departmentstore-alternative
      

      For one feature this is maybe trivial but think you 20 departmentstore implementations. This will require you to look up which is currently installed, uninstall it and then install the new one...

      WDYT?

      Attachments

        Activity

          People

            Unassigned Unassigned
            pieber Andreas Pieber
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: