diff options
author | wisberg <wisberg> | 2003-05-31 07:41:17 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-05-31 07:41:17 +0000 |
commit | d7834ebd34f044a273b5234ff98e76e9c4556121 (patch) | |
tree | d90a6f0edff4ebe5cbb1064c6e8774a5b6c842c4 /build | |
parent | c9570cbaa85e519368cc080079b4327f12f539d4 (diff) | |
download | aspectj-d7834ebd34f044a273b5234ff98e76e9c4556121.tar.gz aspectj-d7834ebd34f044a273b5234ff98e76e9c4556121.zip |
Trim testsrc but not testing dependencies for testing modules.
Diffstat (limited to 'build')
-rw-r--r-- | build/src/org/aspectj/internal/tools/build/Module.java | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/build/src/org/aspectj/internal/tools/build/Module.java b/build/src/org/aspectj/internal/tools/build/Module.java index d2556782e..698252ba7 100644 --- a/build/src/org/aspectj/internal/tools/build/Module.java +++ b/build/src/org/aspectj/internal/tools/build/Module.java @@ -460,7 +460,11 @@ public class Module { * Post-process initialization. * This implementation trims testing-related source * directories, libraries, and modules if trimTesting is enabled/true. - * To build testing modules, trimTesting must be false. + * For modules whose names start with "testing", + * testing-related sources are trimmed, but this does not + * trim dependencies on other modules prefixed "testing" + * or on testing libraries like junit. That means + * testing modules can be built with trimTesting enabled. * @return true if initialization post-processing worked */ protected boolean reviewInit() { @@ -475,20 +479,22 @@ public class Module { iter.remove(); // XXX if verbose log } } - for (ListIterator iter = libJars.listIterator(); iter.hasNext();) { - File libJar = (File) iter.next(); - String name = libJar.getName(); - if ("junit.jar".equals(name.toLowerCase())) { // XXXFileLiteral - iter.remove(); // XXX if verbose log - } - } - for (ListIterator iter = required.listIterator(); iter.hasNext();) { - Module required = (Module) iter.next(); - String name = required.name; - // XXX testing-util only ? - if (name.toLowerCase().startsWith("testing")) { // XXXFileLiteral - iter.remove(); // XXX if verbose log - } + if (!name.startsWith("testing")) { + for (ListIterator iter = libJars.listIterator(); iter.hasNext();) { + File libJar = (File) iter.next(); + String name = libJar.getName(); + if ("junit.jar".equals(name.toLowerCase())) { // XXXFileLiteral + iter.remove(); // XXX if verbose log + } + } + for (ListIterator iter = required.listIterator(); iter.hasNext();) { + Module required = (Module) iter.next(); + String name = required.name; + // XXX testing-util only ? + if (name.toLowerCase().startsWith("testing")) { // XXXFileLiteral + iter.remove(); // XXX if verbose log + } + } } } catch (UnsupportedOperationException e) { return false; // failed XXX log also if verbose |