Skip to end of metadata
Go to start of metadata

The maven-antrun-plugin runs ant with JAVA_HOME set to the jre subdirectory of the JDK, even if the JAVA_HOME for the overall run is a JDK.

 There is documentation elsewhere about how to create a dependency at the project level for the JDK's tools.jar, but this does not help out antrun, which is a plugin.

 The following profile does the job. The '..' in the path hauls up past the 'jre' directory to the lib directory.

The present author got into this pickle by building out a project on a Mac, where there is no separate tools.jar, and then having the resulting build fail on a hudson instance on Linux.

  • No labels

1 Comment

  1. I'm curious what the author did when confronted with the pickle of the build no longer working on a Mac after including this dependency (which isn't found at ${java.home}/../lib/tools.jar).