Community
Participate
Working Groups
The RAP runtime build fails with the following exception when junit 4 is included in the base platform: ----- BUILD FAILED /home/build/rap/build-runtimes/eclipse-3.6/plugins/org.eclipse.pde.build_3.6.0.v20100603/scripts/build.xml:39: The following error occurred while executing this line: /home/build/rap/build-runtimes/eclipse-3.6/plugins/org.eclipse.pde.build_3.6.0.v20100603/scripts/build.xml:139: The following error occurred while executing this line: /home/build/.hudson/jobs/RAP Runtime/workspace/builder/customTargets.xml:64: The following error occurred while executing this line: /home/build/.hudson/jobs/RAP Runtime/workspace/builder/customTargets.xml:124: java.lang.UnsupportedClassVersionError: junit/framework/Test (Unsupported major.minor version 49.0) ----- The current workaround is to remove all junit4 bundles from the plugins directory in the base platform.
Another issue is when we try to build a RAP project with Tycho and junit 4 is included in the base platform, we have some issues about dependency resolution, because of org.eclipse.rap.junit and org.eclipse.rap.junit.runtime. These bundles declare junit dependency using a range [3.8.2,4.0.0) so junit 4 is excluded According to http://wiki.eclipse.org/Eclipse/Testing/JUnit4_Changes "Some test bundles express a narrow version range on org.junit 3.x, such as "[3.8.0,4.0.0)". Such test bundles won't resolve against JUnit4, and hence require updating the version range. Since JUnit is not an eclipse.org project and doesn't necessarily follow our version evolution semantics, the safest approach is to only specify the lower bound dependency. If you still want to be able to run with JUnit3, use a range of "3.8.0". If you only want to run on JUnit4, you can use a range of "4.8.1"." org.eclipse.rap.junit and org.eclipse.rap.junit.runtime should probably declare junit dependency as "3.8.2"
(In reply to comment #1) The rap.junit bundles exclude JUnit4 on purpose, they currently only work with JUnit3. If you like to request to make these bundles compatible with JUnit4, please open a separate enhancement request.
This issue was specific to the PDE build. With the new tycho build (bug 354781), this doesn't happen anymore.