Karaf
  1. Karaf
  2. KARAF-1515

features-generate-descriptor does not set the version in generated features

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: karaf-tooling
    • Labels:
      None

      Description

      When using features-generate-descriptor, the generated features.xml does not set a version. It appears to be because the Feature model checks for null in getVersion(), so it's always returning either the set version string, or the string "0.0.0".

      1. KARAF-1515.patch
        2 kB
        Benjamin Reed

        Activity

        Benjamin Reed created issue -
        Hide
        Benjamin Reed added a comment -

        Attached is a patch that resolves this, by adding the "hasVersion()" boolean method to the Feature object, and then checks that boolean in the karaf-maven-plugin when creating a features.xml file.

        Show
        Benjamin Reed added a comment - Attached is a patch that resolves this, by adding the "hasVersion()" boolean method to the Feature object, and then checks that boolean in the karaf-maven-plugin when creating a features.xml file.
        Benjamin Reed made changes -
        Field Original Value New Value
        Attachment KARAF-1515.patch [ 12530408 ]
        Freeman Fang made changes -
        Assignee Freeman Fang [ ffang ]
        Hide
        Freeman Fang added a comment -

        Hi Benjamin,

        Please re-attach your patch with "Grant Apache License".
        Thanks

        Freeman

        Show
        Freeman Fang added a comment - Hi Benjamin, Please re-attach your patch with "Grant Apache License". Thanks Freeman
        Hide
        Benjamin Reed added a comment -

        Could have sworn I did, but here it is again...

        Show
        Benjamin Reed added a comment - Could have sworn I did, but here it is again...
        Benjamin Reed made changes -
        Attachment KARAF-1515.patch [ 12530545 ]
        Benjamin Reed made changes -
        Attachment KARAF-1515.patch [ 12530408 ]
        Freeman Fang made changes -
        Attachment KARAF-1515.patch [ 12530711 ]
        Freeman Fang made changes -
        Attachment KARAF-1515.patch [ 12530711 ]
        Freeman Fang made changes -
        Attachment KARAF-1515.patch [ 12530712 ]
        Freeman Fang made changes -
        Attachment KARAF-1515.patch [ 12530712 ]
        Freeman Fang made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Freeman Fang added a comment -

        Hi Benjamin,

        Just found the jira patch attachment doesn't work properly, so even you select the "Grant Apache License" radio button, still can't see the Apache feather icon with the attachment, this is the Apache Jira issue.

        Back to your patch, just one thing, webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java implements Feature, but you didn't add new hasVersion() method for that class which cause compilation error. So next time when you attach patch, you need ensure it doesn't break any compilation and tests.

        I just add that minor change and will apply your patch soon.
        Thanks for the patch.

        Freeman

        Show
        Freeman Fang added a comment - Hi Benjamin, Just found the jira patch attachment doesn't work properly, so even you select the "Grant Apache License" radio button, still can't see the Apache feather icon with the attachment, this is the Apache Jira issue. Back to your patch, just one thing, webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java implements Feature, but you didn't add new hasVersion() method for that class which cause compilation error. So next time when you attach patch, you need ensure it doesn't break any compilation and tests. I just add that minor change and will apply your patch soon. Thanks for the patch. Freeman
        Hide
        Freeman Fang added a comment -

        apply patch on behalf of Benjamin with thanks
        http://svn.apache.org/viewvc?rev=1345810&view=rev

        Show
        Freeman Fang added a comment - apply patch on behalf of Benjamin with thanks http://svn.apache.org/viewvc?rev=1345810&view=rev
        Freeman Fang made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Freeman Fang
            Reporter:
            Benjamin Reed
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development