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

Karaf Maven Plugin builds features with invalid configuration

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.7
    • Fix Version/s: 4.1.0, 4.0.8
    • Component/s: karaf
    • Labels:
      None

      Description

      I generated a Karaf Feature using the karaf-feature-archetype. This will add the following configuration to the POM file.

      <build>
          <pluginManagement>
              <plugins>
                  <plugin>
                      <groupId>org.apache.karaf.tooling</groupId>
                      <artifactId>karaf-maven-plugin</artifactId>
                      <version>4.0.7</version>
                      <extensions>true</extensions>
                  </plugin>
              </plugins>
          </pluginManagement>
          <plugins>
              <plugin>
                  <groupId>org.apache.karaf.tooling</groupId>
                  <artifactId>karaf-maven-plugin</artifactId>
      
                  <configuration>
                      <startLevel>50</startLevel>
                      <aggregateFeatures>true</aggregateFeatures>
                      <resolver>(obr)</resolver>
                      <checkDependencyChange>true</checkDependencyChange>
                      <failOnDependencyChange>false</failOnDependencyChange>
                      <logDependencyChanges>true</logDependencyChanges>
                      <overwriteChangedDependencies>true</overwriteChangedDependencies>
                  </configuration>
              </plugin>
          </plugins>
      </build>
      

      The feature can be built but on installation the feature validation fails.

      Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'resolver' is not allowed to appear in element 'feature'.
      

      Basically here are two issues:

      • Karaf Maven Plugin builds a feature with invalid configuration
      • The karaf-feature-archetype contains invalid configuration

      So to solve this Karaf Maven plugin should be enhanced and the resolver tag should be deleted within the archetype.

        Attachments

          Activity

            People

            • Assignee:
              gnt Guillaume Nodet
              Reporter:
              afinke Achim Finke
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: