aboutsummaryrefslogtreecommitdiffstats
path: root/build/src
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-05-25 19:27:45 +0000
committerwisberg <wisberg>2003-05-25 19:27:45 +0000
commit815f083c7b2b394fdd862428499dd75444e700f8 (patch)
tree07e84262d379cb23c57f91cc2d2df730d1382550 /build/src
parent85cd0a0f9b211f7e7239194bacd68f12aaff42bf (diff)
downloadaspectj-815f083c7b2b394fdd862428499dd75444e700f8.tar.gz
aspectj-815f083c7b2b394fdd862428499dd75444e700f8.zip
Fix for failure building with useEclipseCompiles testing-drivers initially (or any module that only indirectly depended on jdt.core, which has no sources)
- better logging - checking zip results - returns false positive for empty zips - compile(..) API change for adopting classes Also, copyright clearly wrong - file created last fall.
Diffstat (limited to 'build/src')
-rw-r--r--build/src/org/aspectj/internal/tools/build/Builder.java33
1 files changed, 20 insertions, 13 deletions
diff --git a/build/src/org/aspectj/internal/tools/build/Builder.java b/build/src/org/aspectj/internal/tools/build/Builder.java
index 14aa22d0f..1c35072c7 100644
--- a/build/src/org/aspectj/internal/tools/build/Builder.java
+++ b/build/src/org/aspectj/internal/tools/build/Builder.java
@@ -1,6 +1,6 @@
/* *******************************************************************
- * Copyright (c) 1999-2001 Xerox Corporation,
- * 2002 Palo Alto Research Center, Incorporated (PARC).
+ * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC),
+ * 2003 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Common Public License v1.0
@@ -8,7 +8,7 @@
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
- * Xerox/PARC initial implementation
+ * PARC initial implementation
* ******************************************************************/
package org.aspectj.internal.tools.build;
@@ -281,22 +281,23 @@ public abstract class Builder {
if (!buildingEnabled) {
return false;
}
- File classesDir =
- useEclipseCompiles
- ? new File(module.moduleDir, "bin") // FileLiteral
- : new File(tempDir, "classes-" + System.currentTimeMillis());
+ final File classesDir;
+ if (useEclipseCompiles) {
+ classesDir = new File(module.moduleDir, "bin"); // FileLiteral
+ } else {
+ String name = "classes-" + System.currentTimeMillis();
+ classesDir = new File(tempDir, name);
+ }
if (verbose) {
handler.log("buildOnly " + module);
}
try {
return (
- useEclipseCompiles || compile(module, classesDir, errors))
+ compile(module, classesDir, useEclipseCompiles, errors))
&& assemble(module, classesDir, errors);
} finally {
- if (!useEclipseCompiles
- && (!Util.deleteContents(classesDir)
- || !classesDir.delete())) {
- errors.add("unable to delete " + classesDir);
+ if (!useEclipseCompiles && !Util.delete(classesDir)) {
+ errors.add("buildOnly unable to delete " + classesDir);
}
}
}
@@ -361,7 +362,7 @@ public abstract class Builder {
if (!targDir.canWrite() && !targDir.mkdirs()) {
if (buildSpec.verbose) {
- handler.log("unable to create " + targDir);
+ handler.log("buildProduct unable to create " + targDir);
}
return false;
}
@@ -511,10 +512,16 @@ public abstract class Builder {
/**
* Compile module classes to classesDir, saving String errors.
+ * @param module the Module to compile
+ * @param classesDir the File directory to compile to
+ * @param useExistingClasses if true, don't recompile
+ * and ensure classes are available
+ * @param errors the List to add error messages to
*/
abstract protected boolean compile(
Module module,
File classesDir,
+ boolean useExistingClasses,
List errors);
/**