Karaf
  1. Karaf
  2. KARAF-968

Features file should require name attribute on features element

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.5, 3.0.0
    • Component/s: karaf-feature
    • Labels:
      None

      Description

      The XML Schema for feature files currently allows the features element (the xml root element) to have no name. Feature repositories with no name declared show up as "repo-0" in the list of repositories. As there currently are several important feature repositories without name [1], the features:listrepositories command returns multiple indistinguishable rows of "repo-0" named repositories.

      I have targeted this improvement at Karaf 3.0.0 since existing feature files (like [1]) won't survive schema validation when the name attribute becomes required.

      [1]
      http://search.maven.org/remotecontent?filepath=org/apache/servicemix/apache-servicemix/4.3.0/apache-servicemix-4.3.0-features.xml
      http://search.maven.org/remotecontent?filepath=org/apache/camel/karaf/apache-camel/2.6.0/apache-camel-2.6.0-features.xml (not the most recent, I know)

        Issue Links

          Activity

          Jamie goodyear made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Jean-Baptiste Onofré made changes -
          Link This issue is related to KARAF-1033 [ KARAF-1033 ]
          Jean-Baptiste Onofré made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Jean-Baptiste Onofré added a comment -

          Revision 1201204.

          Show
          Jean-Baptiste Onofré added a comment - Revision 1201204.
          Hide
          Jean-Baptiste Onofré added a comment -

          Due to itests broken (Pax Exam "embeds" Karaf, so force the "old" feature namespace usage), I let the features namespace in v1.0.0 (on trunk).

          Show
          Jean-Baptiste Onofré added a comment - Due to itests broken (Pax Exam "embeds" Karaf, so force the "old" feature namespace usage), I let the features namespace in v1.0.0 (on trunk).
          Hide
          Jean-Baptiste Onofré added a comment -

          On karaf-2.2.x branch, add a warning message if the features repository doesn't have a name: revision 1200616.

          Show
          Jean-Baptiste Onofré added a comment - On karaf-2.2.x branch, add a warning message if the features repository doesn't have a name: revision 1200616.
          Jean-Baptiste Onofré made changes -
          Fix Version/s 2.2.5 [ 12317857 ]
          Affects Version/s cellar-2.2.2 [ 12316740 ]
          Hide
          Jean-Baptiste Onofré added a comment -

          On trunk, I change the XSD (and so the namespace version).
          On karaf-2.2.x branch, I just raise a warning during parsing.

          Show
          Jean-Baptiste Onofré added a comment - On trunk, I change the XSD (and so the namespace version). On karaf-2.2.x branch, I just raise a warning during parsing.
          Jean-Baptiste Onofré made changes -
          Comment [ As I change the features XSD, I update the namespace version. ]
          Jean-Baptiste Onofré made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Jean-Baptiste Onofré made changes -
          Field Original Value New Value
          Assignee Jean-Baptiste Onofré [ jbonofre ]
          Geert Schuring created issue -

            People

            • Assignee:
              Jean-Baptiste Onofré
              Reporter:
              Geert Schuring
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development