bodewig 2004/02/11 00:39:20 Modified: src/main/org/apache/tools/ant/launch Tag: ANT_16_BRANCH Launcher.java Log: Merge handling of ant.library.dir system property from HEAD Revision Changes Path No revision No revision 1.5.2.9 +15 -1 ant/src/main/org/apache/tools/ant/launch/Launcher.java Index: Launcher.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/launch/Launcher.java,v retrieving revision 1.5.2.8 retrieving revision 1.5.2.9 diff -u -r1.5.2.8 -r1.5.2.9 --- Launcher.java 9 Feb 2004 22:12:17 -0000 1.5.2.8 +++ Launcher.java 11 Feb 2004 08:39:20 -0000 1.5.2.9 @@ -36,6 +36,9 @@ /** The Ant Home property */ public static final String ANTHOME_PROPERTY = "ant.home"; + /** The Ant Library Directory property */ + public static final String ANTLIBDIR_PROPERTY = "ant.library.dir"; + /** The location of a per-user library directory */ public static final String USER_LIBDIR = ".ant/lib"; @@ -138,7 +141,18 @@ // Now try and find JAVA_HOME File toolsJar = Locator.getToolsJar(); - URL[] systemJars = Locator.getLocationURLs(jarDir); + // determine ant library directory for system jars: use property + // or default using location of ant-launcher.jar + File antLibDir = null; + String antLibDirProperty = System.getProperty(ANTLIBDIR_PROPERTY); + if (antLibDirProperty != null) { + antLibDir = new File(antLibDirProperty); + } + if ((antLibDir == null) || ! antLibDir.exists()) { + antLibDir = jarDir; + System.setProperty(ANTLIBDIR_PROPERTY, antLibDir.getAbsolutePath()); + } + URL[] systemJars = Locator.getLocationURLs(antLibDir); File userLibDir = new File(System.getProperty("user.home"), USER_LIBDIR);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]