Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-450

Build not working due to lack of JAVA7_HOME environment variable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.3
    • None
    • None
    • None
    • Workaround Exists
    • 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.

    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?

      Attachments

        Activity

          People

            mmatloka Michal Matloka (Inactive)
            lowecg2004_jira Chris Lowe (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: