Uploaded image for project: 'Maven Invoker Plugin'
  1. Maven Invoker Plugin
  2. MINVOKER-214

Allow indexed maven.version and os.familiy in invoker.properties

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 3.0.0
    • Labels:
      None

      Description

      MINVOKER-209 requires two criteria to run, i.e:

      • Always for non-windows
      • When Windows, run it only with Maven 3.5.0+

      For maven.version, os.family and java.version indexed keys are not allowed (undocumented!), because it makes it much easier to explain why the IT didn't run. In fact, there are much more properties which don't work with an index.

      We could clone the test, but that implies you need to keep both ITs in sync.

        Activity

        Hide
        rfscholte Robert Scholte added a comment -

        Fixed in r1779250

        Solved by adding the following options:

        selector.1.java.version = 1.5+
        selector.1.maven.version = 3.2.5+
        selector.1.os.family = !windows
        selector.2.maven.version = 3.3.9+
        selector.3.java.version = 1.6+
        

        If one of the selectors evaluates to true, the test is executed.

        Show
        rfscholte Robert Scholte added a comment - Fixed in r1779250 Solved by adding the following options: selector.1.java.version = 1.5+ selector.1.maven.version = 3.2.5+ selector.1.os.family = !windows selector.2.maven.version = 3.3.9+ selector.3.java.version = 1.6+ If one of the selectors evaluates to true, the test is executed.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-plugins #8562 (See https://builds.apache.org/job/maven-plugins/8562/)
        MINVOKER-214 Allow indexed maven.version and os.familiy in invoker.properties (rfscholte: http://svn.apache.org/viewvc/?view=rev&rev=1779250)

        • (edit) maven-invoker-plugin/pom.xml
        • (edit) maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/AbstractInvokerMojo.java
        • (edit) maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerProperties.java
        • (add) maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/Selector.java
        • (edit) maven-invoker-plugin/src/test/java/org/apache/maven/plugin/invoker/InvokerPropertiesTest.java
        • (add) maven-invoker-plugin/src/test/java/org/apache/maven/plugin/invoker/SelectorTest.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-plugins #8562 (See https://builds.apache.org/job/maven-plugins/8562/ ) MINVOKER-214 Allow indexed maven.version and os.familiy in invoker.properties (rfscholte: http://svn.apache.org/viewvc/?view=rev&rev=1779250 ) (edit) maven-invoker-plugin/pom.xml (edit) maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/AbstractInvokerMojo.java (edit) maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerProperties.java (add) maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/Selector.java (edit) maven-invoker-plugin/src/test/java/org/apache/maven/plugin/invoker/InvokerPropertiesTest.java (add) maven-invoker-plugin/src/test/java/org/apache/maven/plugin/invoker/SelectorTest.java
        Hide
        gboue Guillaume Boué added a comment -

        Is it not possible to support a invoker.java.version.1 syntax? It would prevent the creation of a new syntax just for those. Also, can the documentation be updated in the selector conditions page?

        Show
        gboue Guillaume Boué added a comment - Is it not possible to support a invoker.java.version.1 syntax? It would prevent the creation of a new syntax just for those. Also, can the documentation be updated in the selector conditions page ?
        Hide
        rfscholte Robert Scholte added a comment -

        I thought about it, but it is not correct, because that would suggest that invoker.goals.1 are only executed when matching invoker.java.version.1 and invoker.goals.2 when matching invoker.java.version.2. What we want is: call all (indexed) goals when at least one selector criteria is matched.
        Also, if you take a look which properties are indexed, those are the ones being passed to the maven-invoker component.
        So there's a huge differenct between the selector properties and the invoker properties, hence doing it with a different prefix should make that clear.

        And yes, I should update that page as well.

        Show
        rfscholte Robert Scholte added a comment - I thought about it, but it is not correct, because that would suggest that invoker.goals.1 are only executed when matching invoker.java.version.1 and invoker.goals.2 when matching invoker.java.version.2 . What we want is: call all (indexed) goals when at least one selector criteria is matched. Also, if you take a look which properties are indexed, those are the ones being passed to the maven-invoker component. So there's a huge differenct between the selector properties and the invoker properties, hence doing it with a different prefix should make that clear. And yes, I should update that page as well.

          People

          • Assignee:
            rfscholte Robert Scholte
            Reporter:
            rfscholte Robert Scholte
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development