Hudson makes extensive use of generics. Thus it has to be compiled with JDK 1.5. There is no possibility of removing the generics from the code as it is too well integrated.
Up until builds in the 1.90ish area, the Hudson build process would use retrotranslator to backport the Hudson to work on JDK 1.4. However, retrotranslator is not perfect. It does not catch every case where you have used a method that was introduced in JDK 1.5. Very often, it would take a couple of days before somebody would catch the problem.
Basically, using retrotranslator was a patch over the seeping wound at best. So retrotranslator was dropped, and you must run Hudson with JRE 1.5.
To make things more fun, there is a bug in JDK 1.5 to do with generic exceptions, so Hudson needs to be compiled with JDK 1.6. Thankfully, this is just a compilation requirements and not a runtime requirement, so we can run Hudson with JDK 1.5)
The Maven2 project type (alpha) uses Maven in a semi-embedded mode, therefore, it must run Maven in the same JRE (as far as I know).
Building with JDK5 and deploying to JDK1.4 (or earlier) is quite possible, but if you'd like to use compiler from the earlier version of JDK, or to run unit tests with the target JVM, you can do as follows:
In your ~/.m2/settings.xml put a ,
Then change your project's pom.xml such that you have something like
You might also consider adding the enforcer plugin to stop the build if the properties are not set or if the compiler and jvm don't exist.
Note: I have not tested this, the need for the .exe's on windows may not exist. Give it a try and update this page when you have something that works (if my initial guess is incorrect)