diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-04-16 12:22:46 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-04-16 13:19:45 +0700 |
commit | 1602d79a829c060c37d0e9627909a8f3638bfd79 (patch) | |
tree | 25eba451aa34b014d1ec22a7e195e8402393201b /org.aspectj.ajdt.core/src | |
parent | d35885bc5faef4936aa5c4207da8f9a3a855630a (diff) | |
download | aspectj-1602d79a829c060c37d0e9627909a8f3638bfd79.tar.gz aspectj-1602d79a829c060c37d0e9627909a8f3638bfd79.zip |
Remove managing obsolete folder lib/asm
The new string AjcTestCase.CLASSPATH_ASM_RENAMED dynamically determines
the 'asm-renamed' location from the classpath, system property
'java.class.path'.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'org.aspectj.ajdt.core/src')
-rw-r--r-- | org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java | 68 |
1 files changed, 25 insertions, 43 deletions
diff --git a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java index c326c0a69..e13f9e224 100644 --- a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java +++ b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java @@ -25,6 +25,7 @@ import java.lang.reflect.Method; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.StringTokenizer; @@ -62,52 +63,33 @@ public abstract class AjcTestCase extends TestCase { */ protected Ajc ajc; + public static final String CLASSPATH_ASM_RENAMED = + Arrays.stream(System.getProperty("java.class.path") + .split(File.pathSeparator)) + .filter(path -> path.contains("asm-renamed")) + .findFirst() + .orElseThrow(() -> new RuntimeException("library 'asm-renamed' not found on classpath")); + // see Ajc and AntSpec public static final String DEFAULT_CLASSPATH_ENTRIES = Ajc.outputFolders("bridge","util","loadtime","weaver","asm","testing-client","runtime","org.aspectj.matcher") - // File.pathSeparator + ".." + File.separator + "bridge" + File.separator - // + "bin" + File.pathSeparator + ".." + File.separator + "util" + File.separator + "bin" + File.pathSeparator + ".." - // + File.separator + "loadtime" + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "weaver" - // + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "weaver5" + File.separator + "bin" - // + File.pathSeparator + ".." + File.separator + "asm" + File.separator + "bin" + File.pathSeparator + ".." - // + File.separator + "testing-client" + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "runtime" - // + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "aspectj5rt" + File.separator + "bin" - // + File.pathSeparator + ".." + File.separator + "org.aspectj.matcher" + File.separator + "bin" - + File.pathSeparator - + ".." + File.separator + "lib" + File.separator + "junit" + File.separator - + "junit.jar" - + File.pathSeparator - + ".." - + File.separator - + "lib" - + File.separator - + "bcel" - + File.separator - + "bcel.jar" - + File.pathSeparator - + ".." - + File.separator - + "lib" - + File.separator - + "bcel" - + File.separator - + "bcel-verifier.jar" - - + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "asm" + File.separator + "asm-9.1.renamed.jar" - - // When the build machine executes the tests, it is using code built into jars rather than code build into - // bin directories. This means for the necessary types to be found we have to put these jars on the classpath: - + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "bridge.jar" - + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "util.jar" - + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator - + "org.aspectj.matcher.jar" + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" - + File.separator + "loadtime.jar" + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" - + File.separator + "weaver.jar" + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" - + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" - + File.separator + "asm.jar" + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "test" - + File.separator + "testing-client.jar" - // hmmm, this next one should perhaps point to an aj-build jar... - + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "test" + File.separator + "aspectjrt.jar"; + + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "junit" + File.separator + "junit.jar" + + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "bcel" + File.separator + "bcel.jar" + + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "bcel" + File.separator + "bcel-verifier.jar" + + File.pathSeparator + CLASSPATH_ASM_RENAMED + // When the build machine executes the tests, it is using code built into jars rather than code build into + // target/classes directories. This means for the necessary types to be found we have to put these jars on the classpath: + + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "bridge.jar" + + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "util.jar" + + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "org.aspectj.matcher.jar" + + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "loadtime.jar" + + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "weaver.jar" + + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "asm.jar" + + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "test" + File.separator + "testing-client.jar" + // hmmm, this next one should perhaps point to an aj-build jar... + + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "test" + File.separator + "aspectjrt.jar" + ; /* * Save reference to real stderr and stdout before starting redirection |