--- VAJImportorig.java	Thu Nov 09 13:57:39 2000
+++ VAJImport.java	Thu Nov 09 14:01:26 2000
@@ -249,6 +249,7 @@
 			classes.copyInto(classesArr);
 			importSpec.setClassFiles(classesArr);
 			if (classesArr.length > 0) {
+				logFiles( classes, "class" );
 				msg.append( classesArr.length );
 				msg.append( " class " );
 				msg.append( classesArr.length > 1 ? "files" : "file" );
@@ -261,6 +262,7 @@
 			sources.copyInto(sourcesArr);
 			importSpec.setJavaFiles(sourcesArr);
 			if (sourcesArr.length > 0) {
+				logFiles( sources, "source" );
 				msg.append( connector );
 				msg.append( sourcesArr.length );
 				msg.append( " source " );
@@ -270,11 +272,14 @@
 		}
 
 		if (importResources) {
+			String resourcePath = fileset.getDir(this.project).getAbsolutePath();
 			resourcesArr = new String[resources.size()];
 			resources.copyInto(resourcesArr);
-			importSpec.setResourcePath(fileset.getDir(this.project).getAbsolutePath());
+			importSpec.setResourcePath(resourcePath);
 			importSpec.setResourceFiles(resourcesArr);
 			if (resourcesArr.length > 0) {
+				logFiles( resources, "resource" );
+				log( "  (relative to resource path '" + resourcePath + "')", org.apache.tools.ant.Project.MSG_VERBOSE );
 				msg.append( connector );
 				msg.append( resourcesArr.length );
 				msg.append( " resource " );
@@ -307,16 +312,31 @@
 		Vector classes,
 		Vector sources,
 		Vector resources) {
+		String resourcePath = dir.getAbsolutePath();
 		for (int i = 0; i < files.length; i++) {
 			String file = (new File(dir, files[i])).getAbsolutePath();
-			if (file.endsWith(".source") || file.endsWith(".SOURCE")) {
+			if (file.endsWith(".java") || file.endsWith(".JAVA")) {
 				sources.addElement(file);
 			} else
 				if (file.endsWith(".class") || file.endsWith(".CLASS")) {
 					classes.addElement(file);
 				} else {
+					// for resources VA expects the path relative to the resource path
+					file = file.substring( resourcePath.length()+1, file.length() );
 					resources.addElement(file);
 				}
+		}
+	}
+
+	/**
+ 	 * Logs a list of file names to the message log
+ 	 * @param fileNames java.util.Vector file names to be logged
+ 	 * @param type java.lang.String file type
+ 	 */
+	protected void logFiles(Vector fileNames, String fileType) {
+		log(  fileType + " files found for import:", org.apache.tools.ant.Project.MSG_VERBOSE);
+		for ( Enumeration e = fileNames.elements(); e.hasMoreElements(); ) {
+			log( "    " + e.nextElement(), org.apache.tools.ant.Project.MSG_VERBOSE );
 		}
 	}
 }
