From 5ae6445eff68b511f28bbfdc2dbb6411c62dfdf0 Mon Sep 17 00:00:00 2001 From: acolyer Date: Sat, 8 Mar 2003 16:37:49 +0000 Subject: [PATCH] Instructions for building with an IBM 1.4.x JDK. Clarification on test harness vs JUnit tests. --- build/readme-build-and-test-aspectj.html | 27 ++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/build/readme-build-and-test-aspectj.html b/build/readme-build-and-test-aspectj.html index 70732d7bf..575194070 100644 --- a/build/readme-build-and-test-aspectj.html +++ b/build/readme-build-and-test-aspectj.html @@ -6,7 +6,7 @@ This describes how to build and test AspectJ for developers working on source code for AspectJ. It covers building with Ant or Eclipse and testing with -JUnit or the harness used for compiler tests. +JUnit and the harness used for compiler tests. For information on how the build works and how to debug failed builds, see @@ -241,11 +241,13 @@ for each package for the module as a whole ({module}/testsrc/{module}ModuleTests.java). -The AspectJ project also has custom tests in the +

The AspectJ project also has additional custom tests in the tests module, mainly the compiler tests run by the harness in - ajcTests.xml. - + ajcTests.xml. It is important +to run these additional compiler tests (not covered by the JUnit +suite) before and after any change to the compiler. +

Running JUnit tests in Eclipse

JUnit tests may be run under eclipse by selecting any JUnit source file and creating a run configuration for it. @@ -439,6 +441,23 @@ Some build problems and fixes encountered in the past: gets it from $JAVA_HOME or if the bin directory is on the PATH. +
  • If using an IBM JDK at version 1.4 or higher within Eclipse, + then the default value of JRE_LIB will point to the jar file + "core.jar." Unlike the Sun JDK, IBM does not package the full + runtime into a single jar ("rt.jar"), but instead has multiple + jar files. Since core.jar does not contain the graphics libraries, + several of the AspectJ projects will fail to build as checked out + of CVS - there are missing dependencies on AWT and swing. The + solution is to add graphics.jar to the project classpaths... BUT + if this is added as an ordinary (external jar), then the main + ant build script will pick up the contents of graphics.jar and + include it in the aspectj distribution (obvious clue, the size of + the built aspectjtools.jar doubles to about 10MB). Instead, from the + Java Build Path properties page of the project, select "Add Library" + and add the JDK library. You now have to remove the JRE_LIB entry + from the project or Eclipse complains about duplicate jar files + in the path. +