You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by jk...@apache.org on 2005/06/06 21:45:33 UTC
cvs commit: ant/src/main/org/apache/tools/ant ComponentHelper.java Diagnostics.java
jkf 2005/06/06 12:45:32
Modified: src/main/org/apache/tools/ant/launch Launcher.java
src/main/org/apache/tools/ant ComponentHelper.java
Diagnostics.java
Log:
PR: 35246
As suggested by Darin Swanson.
(use USER_LIBDIR, and use File.separatorChar in there)
Revision Changes Path
1.31 +3 -3 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.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- Launcher.java 20 May 2005 16:44:56 -0000 1.30
+++ Launcher.java 6 Jun 2005 19:45:32 -0000 1.31
@@ -50,7 +50,8 @@
public static final String ANT_PRIVATELIB = "lib";
/** The location of a per-user library directory */
- public static final String USER_LIBDIR = ANT_PRIVATEDIR + "/" + ANT_PRIVATELIB;
+ public static final String USER_LIBDIR =
+ ANT_PRIVATEDIR + File.separatorChar + ANT_PRIVATELIB;
/** The startup class that is to be run */
public static final String MAIN_CLASS = "org.apache.tools.ant.Main";
@@ -206,8 +207,7 @@
URL[] systemJars = Locator.getLocationURLs(antLibDir);
File userLibDir
- = new File(System.getProperty(USER_HOMEDIR),
- ANT_PRIVATEDIR + File.separatorChar + ANT_PRIVATELIB);
+ = new File(System.getProperty(USER_HOMEDIR), USER_LIBDIR);
URL[] userJars = noUserLib ? new URL[0] : Locator.getLocationURLs(userLibDir);
1.57 +1 -4 ant/src/main/org/apache/tools/ant/ComponentHelper.java
Index: ComponentHelper.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/ComponentHelper.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- ComponentHelper.java 26 May 2005 18:54:25 -0000 1.56
+++ ComponentHelper.java 6 Jun 2005 19:45:32 -0000 1.57
@@ -802,10 +802,7 @@
boolean definitions = false;
boolean antTask;
String home = System.getProperty(Launcher.USER_HOMEDIR);
- File libDir = new File(home,
- Launcher.ANT_PRIVATEDIR +
- File.separator +
- Launcher.ANT_PRIVATELIB);
+ File libDir = new File(home, Launcher.USER_LIBDIR);
//look up the name
AntTypeDefinition def = getDefinition(componentName);
if (def == null) {
1.29 +1 -2 ant/src/main/org/apache/tools/ant/Diagnostics.java
Index: Diagnostics.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Diagnostics.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- Diagnostics.java 22 May 2005 16:13:54 -0000 1.28
+++ Diagnostics.java 6 Jun 2005 19:45:32 -0000 1.29
@@ -285,8 +285,7 @@
private static void doReportUserHomeLibraries(PrintStream out) {
String home = System.getProperty(Launcher.USER_HOMEDIR);
out.println("user.home: " + home);
- File libDir = new File(home,
- Launcher.ANT_PRIVATEDIR + File.separator + Launcher.ANT_PRIVATELIB);
+ File libDir = new File(home, Launcher.USER_LIBDIR);
File[] libs = listJarFiles(libDir);
printLibraries(libs, out);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org