Use the JDK configured for the job

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      For some reasons, I need to compile my code with JDK 1.5. I configured a Hudson job with this version and I also configured the maven enforcer plugin to check if the proper JDK is used.

      When I do a release I get this error, obviously I don't use during release the JDK configured for the job :

      FO] [INFO] [enforcer:enforce

      {execution: enforce-versions}

      ]
      [INFO] [DEBUG] Executing rule: org.apache.maven.plugins.enforcer.RequireJavaVersion
      [INFO] [DEBUG] Rule org.apache.maven.plugins.enforcer.RequireJavaVersion is cacheable.
      [INFO] [DEBUG] Detected Java String: 1.6.0_20
      [INFO] [DEBUG] Normalized Java String: 1.6.0-20
      [INFO] [DEBUG] Parsed Version: Major: 1 Minor: 6 Incremental: 0 Build: 20 Qualifier: null
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [ERROR] BUILD ERROR
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
      [INFO] Detected JDK Version: 1.6.0-20 is not in the allowed range [1.5,1.6).
      [INFO]
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [DEBUG] Trace
      [INFO] org.apache.maven.lifecycle.LifecycleExecutionException: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
      [INFO] Detected JDK Version: 1.6.0-20 is not in the allowed range [1.5,1.6).

            Assignee:
            Unassigned
            Reporter:
            pascalleclercq
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: