Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5779

If JAVA_HOME environment variable not set, Maven module "distribution" fails in maven-invoker-plugin

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.7.2
    • 1.7.4
    • kernel
    • None

    Description

      If the environment variable "JAVA_HOME" is not set, an error is thrown during the Maven build of module 'distribution'.

      ERROR: JAVA_HOME not found in your environment.
      Please set the JAVA_HOME variable in your environment to match the location of your Java installation

      This is thrown by the Maven job started by the maven-invoker-plugin.

      Here from "modules/distribution/pom.xml":

      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>2.0.0</version>
        <executions>
          <execution>
            <id>build-maven-samples</id>
            <phase>integration-test</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <projectsDirectory>${project.build.directory}/axis2-${project.version}/samples</projectsDirectory>
              <pomIncludes>
                <pomInclude>pom.xml</pomInclude>
              </pomIncludes>
              <streamLogs>true</streamLogs>
            </configuration>
          </execution>
        </executions>
      </plugin>
      

      This problem can be resolved by adding the following line to the plugin configuration:

      <javaHome>${java.home}</javaHome>
      

      This passes the Java installation path of the current pom.xml to the invoked maven pom.xml.

      Attachments

        Activity

          People

            veithen Andreas Veithen
            JWT007 Jeff Thomas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: