JUnit 4 requires due to Annotation usage JDK 1.5. For many environments, this is a strong limitation, as JDK 1.5 is not allowed to be used in production systems.
RetroWeaver (http://retroweaver.sourceforge.net) is a JDK 1.5 backward compatibility tool to allow JDK 1.5 based development, and JDK 1.4 (down to JDK 1.1) based deployment. For more details see RetroWeaver website.
There is a sample included, using an ANT build file to compile and weave code, and run JUnit 4.x based tests using JDK 1.4.
There is a test included, based on latest RetroWeaver version 2.0Beta4.
The complete JUnit test suite is working now fine.
retroweaver-1.2.2.logretroweaver-1.2.5.logretroweaver-2.0Beta2.logThese bugs have been posted to RetroWeaver, and solved now by the cool guys from RetroWeaver:
NPE
in AIB.getMethodAnnotation(AIB.java:175)NoSuchMethodError:
String.format(String, Object[]):StringShort tutorial how to make these tests for your own:
junit42.zip).
Copy into .../src-jdk14/3rdPartyretroweaver-2.0Beta4.zip).
Copy into .../src-jdk14/3rdParty.../src-jdk14/build.local.properties.../src-jdk14/build.local.properties.../src-jdk14/build.xml with target test