diff --git a/docs/faq.html b/docs/faq.html index 8e0fa8d93..451e18729 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -452,6 +452,12 @@ <junitreport> doesn't work with JDK 1.5 but worked fine with JDK 1.4. + +
  • + + Ant runs into an infinite loop/throws an OutOufMemoryError + when I compile my project under Mac OS X. +
  • @@ -2204,6 +2210,50 @@ mv /tmp/foo $ANT_HOME/bin/antRun to use this task with JDK 1.5 in older versions of Ant.

    Starting with Ant 1.6.2 <junitreport> supports JDK 1.5.

    +

    + + + Ant runs into an infinite loop/throws an OutOufMemoryError + when I compile my project under Mac OS X. + +

    +

    Apple's Java VMs reside + in /System/Library/Frameworks/JavaVM.framework/Versions/X.Y.Z + and JAVA_HOME will usually be something + like /System/Library/Frameworks/JavaVM.framework/Versions/X.Y.Z/Home.

    +

    Inside this home directory there is a symbolic link + named shared_bundle that links three levels up, + i.e. to /System/Library/Frameworks/JavaVM.framework.

    +

    If your build file contains a fileset like

    +
    +<fileset dir="${java.home}" includes="**/*.jar"/>
    +
    +

    Ant is going to follow the shared_bundle + symlink and ends up recursing into all your installed VMs. + Even worse, it will + enter /System/Library/Frameworks/JavaVM.framework/Versions/X.Y.Z/Home + and will once again follow the same symlink.

    +

    Ant versions after Ant 1.7.1 will detect the infinite loop + they are in, but the resulting fileset may still be too big to + deal with, in particular if you have many different VM + versions installed. The problem is amplified by the fact that + each installed version has a shared_bundle + symlink in it.

    +

    One solution is to not allow the fileset to follow symbolic + links at all, like in

    +
    +<fileset dir="${java.home}" includes="**/*.jar" followsymlinks="false"/>
    +
    +

    another one excludes the shared_bundle + directories:

    +
    +<fileset dir="${java.home}" includes="**/*.jar" excludes="**/shared_bundle/**"/>
    +
    +

    For Ant 1.7.1 and earlier + excluding shared_bundle may not be enough since + there is another symlink bundle that points to + the Home directory and will cause infite + recursions as well.

    diff --git a/xdocs/faq.xml b/xdocs/faq.xml index e8dc23f73..608f63ba4 100644 --- a/xdocs/faq.xml +++ b/xdocs/faq.xml @@ -1950,6 +1950,58 @@ mv /tmp/foo $ANT_HOME/bin/antRun + + + + Ant runs into an infinite loop/throws an OutOufMemoryError + when I compile my project under Mac OS X. + + + +

    Apple's Java VMs reside + in /System/Library/Frameworks/JavaVM.framework/Versions/X.Y.Z + and JAVA_HOME will usually be something + like /System/Library/Frameworks/JavaVM.framework/Versions/X.Y.Z/Home.

    + +

    Inside this home directory there is a symbolic link + named shared_bundle that links three levels up, + i.e. to /System/Library/Frameworks/JavaVM.framework.

    + +

    If your build file contains a fileset like

    + +]]> +

    Ant is going to follow the shared_bundle + symlink and ends up recursing into all your installed VMs. + Even worse, it will + enter /System/Library/Frameworks/JavaVM.framework/Versions/X.Y.Z/Home + and will once again follow the same symlink.

    + +

    Ant versions after Ant 1.7.1 will detect the infinite loop + they are in, but the resulting fileset may still be too big to + deal with, in particular if you have many different VM + versions installed. The problem is amplified by the fact that + each installed version has a shared_bundle + symlink in it.

    + +

    One solution is to not allow the fileset to follow symbolic + links at all, like in

    + +]]> +

    another one excludes the shared_bundle + directories:

    + +]]> + +

    For Ant 1.7.1 and earlier + excluding shared_bundle may not be enough since + there is another symlink bundle that points to + the Home directory and will cause infite + recursions as well.

    +
    +