ShrinkWrap
  1. ShrinkWrap
  2. SHRINKWRAP-450

Build not working due to lack of JAVA7_HOME environment variable

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.1.3
    • Component/s: None
    • Labels:
      None
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Define an environment variable JAVA7_HOME that points to a Java 7 JDK home.

      Show
      Define an environment variable JAVA7_HOME that points to a Java 7 JDK home.
    • Similar Issues:
      Show 10 results 

      Description

      Shrinkwrap nio2-api fails to compile, resulting in the following error:

      [INFO] ------------------------------------------------------------------------
      [INFO] Building ShrinkWrap NIO.2 API 1.1.3-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — maven-clean-plugin:2.4.1:clean (default-clean) @ shrinkwrap-api-nio2 —
      [INFO] Deleting C:\source\external\shrinkwrap\api-nio2\target
      [INFO]
      [INFO] — maven-enforcer-plugin:1.0:enforce (enforce-java-version) @ shrinkwrap-api-nio2 —
      [INFO]
      [INFO] — maven-enforcer-plugin:1.0:enforce (enforce-maven-version) @ shrinkwrap-api-nio2 —
      [INFO]
      [INFO] — maven-enforcer-plugin:1.0:enforce (enforce-maven-environment) @ shrinkwrap-api-nio2 —
      [INFO]
      [INFO] — maven-resources-plugin:2.5:resources (default-resources) @ shrinkwrap-api-nio2 —
      [debug] execute contextualize
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory C:\source\external\shrinkwrap\api-nio2\src\main\resources
      [INFO]
      [INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ shrinkwrap-api-nio2 —
      [INFO] Compiling 4 source files to C:\source\external\shrinkwrap\api-nio2\target\classes
      [INFO] -------------------------------------------------------------
      [ERROR] COMPILATION ERROR :
      [INFO] -------------------------------------------------------------
      [ERROR] Failure executing javac, but could not parse the error:
      The system cannot find the path specified.

      After some digging into this, it turned out this error was down to a missing environment variable JAVA7_HOME. This is not obvious from the error message.

      Currently in the shrinkwrap parent pom.xml there is a check for the JAVA5_HOME. Could an additional check be added at the same point for JAVA7_HOME?

        Activity

        Hide
        Michal Matloka
        added a comment -

        It seems that enforcer already forces jdk 1.7.0 but NIO2 module incorrectly refers to JAVA7_HOME. I've removed that line referencing to JAVA7_HOME since it is not needed in such configuration.

        Show
        Michal Matloka
        added a comment - It seems that enforcer already forces jdk 1.7.0 but NIO2 module incorrectly refers to JAVA7_HOME. I've removed that line referencing to JAVA7_HOME since it is not needed in such configuration.
        Show
        Andrew Rubinger
        added a comment - Upstream: https://github.com/shrinkwrap/shrinkwrap/commit/d23351acc9edccfabfe5b3284bd19a1e2bc8a746
        Hide
        Michal Matloka
        added a comment -

        JAVA7_HOME reference wasnt removed from api-nio2

        Show
        Michal Matloka
        added a comment - JAVA7_HOME reference wasnt removed from api-nio2
        Show
        Andrew Rubinger
        added a comment - More upstream: https://github.com/shrinkwrap/shrinkwrap/commit/6ef62449106e15d9f7038caa565c4d2eff0d9b09

          People

          • Assignee:
            Michal Matloka
            Reporter:
            Chris Lowe
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: