GMaven (OLD... DO NOT USE)
  1. GMaven (OLD... DO NOT USE)
  2. MGROOVY-182

Enforcer plugin in main project POM too strict - won't allow build with Java 6

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-rc-4
    • Fix Version/s: 1.0-rc-4
    • Component/s: tools
    • Labels:
      None
    • Environment:
      -
    • Patch Submitted:
      Yes
    • Number of attachments :
      0

      Description

      This is a configuration issue in the main GMaven project POM.

      The enforcer plugin sure looks like it would allow you to build with with Java 6, but "1.6" is taken to mean "less than 1.6". I've changed this locally so I can build with Java 6, and it works. I have included a suggested fix below. I don't understand the enforcer plugin all that well, so there may be a more elegant fix. But this definitely fixes the problem I see.

      [INFO] [enforcer:enforce

      {execution: default}

      ]
      [WARNING] Rule 0: org.apache.maven.plugin.enforcer.RequireJavaVersion failed with message: Detected JDK Version: 1.6.0-11 is not in the allowed range [1.4,1.6).

      Suggested patch (remove asterisks!!!):
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-enforcer-plugin</artifactId>
      <executions>
      <execution>
      <phase>validate</phase>
      <goals>
      <goal>enforce</goal>
      </goals>
      <configuration>
      <rules>
      <requireJavaVersion>
      <version>[1.4,**1.6.0-99**)</version>
      </requireJavaVersion>
      ...

        Activity

        Hide
        Jason Dillon added a comment -

        I agree, its about time to make 1.6 work OOTB.

        Show
        Jason Dillon added a comment - I agree, its about time to make 1.6 work OOTB.

          People

          • Assignee:
            Jason Dillon
            Reporter:
            Jason Smith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: