Author: bodewig
Date: Thu Dec 4 02:43:41 2008
New Revision: 723283
URL: http://svn.apache.org/viewvc?rev=723283&view=rev
Log:
add a few more debug log statements
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java?rev=723283&r1=723282&r2=723283&view=diff
==============================================================================
---
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
(original)
+++
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
Thu Dec 4 02:43:41 2008
@@ -269,11 +269,13 @@
}
}
- if (checkPath.length() == 0) {
- return null;
+ Path p = null;
+ if (checkPath.length() > 0) {
+ p = new Path(getProject(), checkPath);
}
- return new Path(getProject(), checkPath);
+ log("Classpath without dest dir is " + p, Project.MSG_DEBUG);
+ return p;
}
/**
@@ -341,7 +343,10 @@
dependencyList = new Vector();
Enumeration depEnum = analyzer.getClassDependencies();
while (depEnum.hasMoreElements()) {
- dependencyList.addElement(depEnum.nextElement());
+ Object o = depEnum.nextElement();
+ dependencyList.addElement(o);
+ log("Class " + info.className + " depends on " + o,
+ Project.MSG_DEBUG);
}
cacheDirty = true;
dependencyMap.put(info.className, dependencyList);
@@ -361,6 +366,8 @@
}
affectedClasses.put(info.className, info);
+ log(dependentClass + " affects " + info.className,
+ Project.MSG_DEBUG);
}
}
@@ -377,12 +384,15 @@
Object nullFileMarker = new Object();
for (Enumeration e = dependencyMap.keys();
e.hasMoreElements();) {
String className = (String) e.nextElement();
+ log("Determining classpath dependencies for " + className,
+ Project.MSG_DEBUG);
Vector dependencyList = (Vector)
dependencyMap.get(className);
Hashtable dependencies = new Hashtable();
classpathDependencies.put(className, dependencies);
Enumeration e2 = dependencyList.elements();
while (e2.hasMoreElements()) {
String dependency = (String) e2.nextElement();
+ log("Looking for " + dependency, Project.MSG_DEBUG);
Object classpathFileObject
= classpathFileCache.get(dependency);
if (classpathFileObject == null) {
@@ -392,6 +402,7 @@
&& !dependency.startsWith("javax.")) {
URL classURL
=
loader.getResource(dependency.replace('.', '/') + ".class");
+ log("URL is " + classURL, Project.MSG_DEBUG);
if (classURL != null) {
if (classURL.getProtocol().equals("jar")) {
String jarFilePath =
classURL.getFile();
@@ -414,12 +425,17 @@
+ " depends on " + classpathFileObject
+ " due to " + dependency,
Project.MSG_DEBUG);
}
+ } else {
+ log("Ignoring base classlib dependency "
+ + dependency, Project.MSG_DEBUG);
}
classpathFileCache.put(dependency,
classpathFileObject);
}
if (classpathFileObject != nullFileMarker) {
// we need to add this jar to the list for this
class.
File jarFile = (File) classpathFileObject;
+ log("Adding a classpath dependency on " + jarFile,
+ Project.MSG_DEBUG);
dependencies.put(jarFile, jarFile);
}
}
@@ -429,6 +445,8 @@
loader.cleanup();
}
}
+ } else {
+ log("No classpath to check", Project.MSG_DEBUG);
}
// write the dependency cache to the disk