Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7043693

Ant problems with ~/.antrc and other config files

XMLWordPrintable

    • generic
    • generic

      It appears that by default the ant build tool will sometimes pick up settings that impact the build from the environment and also from files like ~/.antrc, which will could invalidate settings needed in the jdk build process.

      Use of --noconfig --nouserlib --noclasspath --noinput --autoproxy

      The jars of the ant distribution need to be excluded too, but that may be well known, all javac logic in ant scripts needs to specify: includeAntRuntime="no"
      Not doing this will result in many ant runtime jar files being included in your classpath.

      Another issue is the poor ant tempdir logic, when using ant on the same system, it can easily collide with each other, so you need:
         export ANT_OPTS="-Djava.io.tmpdir='$(ANT_TMPDIR)'"
      Where you have created a unique area for the ANT_TMPDIR.

      Since there is no sharing of ant logic in the various repositories, every use of an ant build script needs to be checked.
      Copied from http://bugs.openjdk.java.net/show_bug.cgi?id=100099

      Description From Jesse Glick 2009-08-11 12:04:01 PDT

      Created an attachment (id=129) [details]
      Suggested patch

      For clarity, use includeantruntime="false" on the compilation of make/tools
      (consistent with other <javac> invocations in the same script); the classpath
      already specifies ant.jar, which can also now be more robustly specified as
      ant.core.lib (does not assume a particular layout of the Ant installation).

      Helpful for using http://wiki.netbeans.org/AutomaticProjects on the langtools
      project: File > New Project > Java > Automatic Project, select jdk7/langtools,
      and when open Build and choose make/build.xml as the script (default target
      selection 'build' is fine). Libraries node should show just ant.jar, not all
      the other JARs in the Ant distribution and tools.jar.

            katleman David Katleman (Inactive)
            ohair Kelly Ohair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: