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

inconsistent FeaturesNamespaces versions

    Details

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

      Description

      should this be same version number 1.2.0?

      String URI_CURRENT = URI_1_2_0;
      QName FEATURES_CURRENT = FEATURES_1_1_0;

      ################################################

      public interface FeaturesNamespaces {
      
          String URI_0_0_0 = "";
          String URI_1_0_0 = "http://karaf.apache.org/xmlns/features/v1.0.0";
          String URI_1_1_0 = "http://karaf.apache.org/xmlns/features/v1.1.0";
          String URI_1_2_0 = "http://karaf.apache.org/xmlns/features/v1.2.0";
      
          String URI_CURRENT = URI_1_2_0;
      
          QName FEATURES_0_0_0 = new QName("features");
          QName FEATURES_1_0_0 = new QName(URI_1_0_0, "features");
          QName FEATURES_1_1_0 = new QName(URI_1_1_0, "features");
          QName FEATURES_1_2_0 = new QName(URI_1_2_0, "features");
      
          QName FEATURES_CURRENT = FEATURES_1_1_0;
      
      }
      

        Activity

        Hide
        pieber Andreas Pieber added a comment -

        Applied itest fix on behalf of Timo Naroska. Thanks! (please close the pull request since it had been merged)

        Committing to https://svn.apache.org/repos/asf/karaf/trunk ...
                M       tooling/karaf-maven-plugin/src/it/test-aggregate-features/control.xml
                M       tooling/karaf-maven-plugin/src/it/test-basic-generation/control.xml
                M       tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/control.xml
                M       tooling/karaf-maven-plugin/src/it/test-check-dependencies/control.xml
                M       tooling/karaf-maven-plugin/src/it/test-input-file/control.xml
                M       tooling/karaf-maven-plugin/src/it/test-type-classifier/control.xml
        Committed r1448904
        
        Show
        pieber Andreas Pieber added a comment - Applied itest fix on behalf of Timo Naroska. Thanks! (please close the pull request since it had been merged) Committing to https: //svn.apache.org/repos/asf/karaf/trunk ... M tooling/karaf-maven-plugin/src/it/test-aggregate-features/control.xml M tooling/karaf-maven-plugin/src/it/test-basic-generation/control.xml M tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/control.xml M tooling/karaf-maven-plugin/src/it/test-check-dependencies/control.xml M tooling/karaf-maven-plugin/src/it/test-input-file/control.xml M tooling/karaf-maven-plugin/src/it/test-type-classifier/control.xml Committed r1448904
        Hide
        tnarake Timo Naroska added a comment -

        This change affects the integration-tests of the karaf-maven-plugin. Fix is in pull request:

        https://github.com/apache/karaf/pull/13

        Show
        tnarake Timo Naroska added a comment - This change affects the integration-tests of the karaf-maven-plugin. Fix is in pull request: https://github.com/apache/karaf/pull/13
        Hide
        iocanel Ioannis Canellos added a comment -

        Committed on behalf of Andrei Pozolotin!
        Thanks!

        Show
        iocanel Ioannis Canellos added a comment - Committed on behalf of Andrei Pozolotin! Thanks!
        Hide
        andrei.pozolotin Andrei Pozolotin added a comment -

        thank you.

        Show
        andrei.pozolotin Andrei Pozolotin added a comment - thank you.
        Hide
        iocanel Ioannis Canellos added a comment -

        The patch looks good. I'll need some extra time to try it out.

        Show
        iocanel Ioannis Canellos added a comment - The patch looks good. I'll need some extra time to try it out.
        Hide
        jbonofre Jean-Baptiste Onofré added a comment -

        Thanks for the reminder. I set the fix versions and if Ioannis has no time, I will tackle it.

        Show
        jbonofre Jean-Baptiste Onofré added a comment - Thanks for the reminder. I set the fix versions and if Ioannis has no time, I will tackle it.
        Hide
        andrei.pozolotin Andrei Pozolotin added a comment -

        JB, Ioannis: please review/merge

        Show
        andrei.pozolotin Andrei Pozolotin added a comment - JB, Ioannis: please review/merge
        Hide
        andrei.pozolotin Andrei Pozolotin added a comment -

        ok, will do. thanks for looking.

        Show
        andrei.pozolotin Andrei Pozolotin added a comment - ok, will do. thanks for looking.
        Hide
        iocanel Ioannis Canellos added a comment -

        Andrei,

        I think that you are right. Do you want to provide a patch for it?

        Show
        iocanel Ioannis Canellos added a comment - Andrei, I think that you are right. Do you want to provide a patch for it?
        Hide
        andrei.pozolotin Andrei Pozolotin added a comment -

        it seems Ioannis Canellos is the appropriate expert to take a look on this.

        Show
        andrei.pozolotin Andrei Pozolotin added a comment - it seems Ioannis Canellos is the appropriate expert to take a look on this.
        Hide
        andrei.pozolotin Andrei Pozolotin added a comment - - edited

        and this should not use hard coded literal:

        instead use FeaturesNamespaces.URI_CURRENT

        @javax.xml.bind.annotation.XmlSchema(namespace = "http://karaf.apache.org/xmlns/features/v1.2.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
        package org.apache.karaf.features.internal.model;
        
        import org.apache.karaf.features.FeaturesNamespaces;
        
        
        Show
        andrei.pozolotin Andrei Pozolotin added a comment - - edited and this should not use hard coded literal: instead use FeaturesNamespaces.URI_CURRENT @javax.xml.bind.annotation.XmlSchema(namespace = "http: //karaf.apache.org/xmlns/features/v1.2.0" , elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.apache.karaf.features.internal.model; import org.apache.karaf.features.FeaturesNamespaces;
        Hide
        andrei.pozolotin Andrei Pozolotin added a comment -

        FeatureDeploymentListener

        also needs new version entry here:

            private boolean isKnownFeaturesURI(String uri){
            	if(uri == null){
            		return true;
            	}
            	if(FeaturesNamespaces.URI_0_0_0.equalsIgnoreCase(uri)){
            		return true;
            	}
            	if(FeaturesNamespaces.URI_1_0_0.equalsIgnoreCase(uri)){
            		return true;
            	}
            	if(FeaturesNamespaces.URI_1_1_0.equalsIgnoreCase(uri)){
            		return true;
            	}
            	if(FeaturesNamespaces.URI_CURRENT.equalsIgnoreCase(uri)){
            		return true;
            	}
            	return false;
            }
        
        
        Show
        andrei.pozolotin Andrei Pozolotin added a comment - FeatureDeploymentListener also needs new version entry here: private boolean isKnownFeaturesURI( String uri){ if (uri == null ){ return true ; } if (FeaturesNamespaces.URI_0_0_0.equalsIgnoreCase(uri)){ return true ; } if (FeaturesNamespaces.URI_1_0_0.equalsIgnoreCase(uri)){ return true ; } if (FeaturesNamespaces.URI_1_1_0.equalsIgnoreCase(uri)){ return true ; } if (FeaturesNamespaces.URI_CURRENT.equalsIgnoreCase(uri)){ return true ; } return false ; }

          People

          • Assignee:
            iocanel Ioannis Canellos
            Reporter:
            andrei.pozolotin Andrei Pozolotin
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development