Karaf
  1. Karaf
  2. KARAF-1182

Karaf features-maven-plugin always selects lowest version in range

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.5
    • Fix Version/s: 2.2.6
    • Component/s: None
    • Labels:
      None

      Description

      For example, the following plugin config
      <plugin>
      <groupId>org.apache.karaf.tooling</groupId>
      <artifactId>features-maven-plugin</artifactId>
      <version>2.2.5</version>
      <executions>
      <execution>
      <id>add-features-to-repo</id>
      <phase>generate-resources</phase>
      <goals>
      <goal>add-features-to-repo</goal>
      </goals>
      <configuration>
      <descriptors>
      <descriptor>mvn:org.apache.camel.karaf/apache-camel/2.9.0/xml/features</descriptor>
      </descriptors>
      <features>
      <feature>camel-spring</feature>
      </features>
      <includeMvnBasedDescriptors>true</includeMvnBasedDescriptors>
      <repository>target/features-repo</repository>
      </configuration>
      </execution>
      </executions>
      </plugin>

      Will download org/springframework/spring-core/2.5.6.SEC02/spring-core-2.5.6.SEC02.jar rather than spring 3.0.6 that is preferred. The plugin from Karaf 2.2.4 doesn't have this issue.

      1. KARAF-1182.patch
        1 kB
        Jonathan Anstey

        Activity

        Hide
        Jonathan Anstey added a comment -

        Patch to fix the issue on karaf-2.2.x branch.

        Show
        Jonathan Anstey added a comment - Patch to fix the issue on karaf-2.2.x branch.
        Hide
        Jonathan Anstey added a comment -

        Not sure yet if this problem occurs on trunk.

        Show
        Jonathan Anstey added a comment - Not sure yet if this problem occurs on trunk.
        Hide
        Andreas Pieber added a comment -

        looks pretty good to me. In addition, to get the latest version instead of the first sounds like the better/correct behavior to me anyhow.

        Thank you very much for the patch. I'll apply it.

        Show
        Andreas Pieber added a comment - looks pretty good to me. In addition, to get the latest version instead of the first sounds like the better/correct behavior to me anyhow. Thank you very much for the patch. I'll apply it.
        Hide
        Andreas Pieber added a comment -

        Committing to https://svn.apache.org/repos/asf/karaf/branches/karaf-2.2.x ...
        M tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java
        Committed r1240650

        Show
        Andreas Pieber added a comment - Committing to https://svn.apache.org/repos/asf/karaf/branches/karaf-2.2.x ... M tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java Committed r1240650
        Hide
        Jonathan Anstey added a comment -

        Cool, thanks Andreas!

        Show
        Jonathan Anstey added a comment - Cool, thanks Andreas!

          People

          • Assignee:
            Andreas Pieber
            Reporter:
            Jonathan Anstey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development