... until I did "mvn clean" and "mvn -Plight-test install" again. Reading through main pom.xml it occured to me that Jenkins code base should conform to Java 5, and the only reason Java 6 compiler is used is to avoid some bug in Java 5. Unfortunately, it seems that a side effect of this workaround is that some Java 6 features such as @Override on interface implementations have sneaked into the codebase anyway.

Since Sun javac is happy about the source version being set to 1.5 and doesn't allow it to be higher than the target version, whereas Eclipse java compiler is unhappy about source version being set to 1.5, it seems that the only sensible solution is to make sure that generated jenkins/*/.settings/org.eclipse.jdt.core.prefs is modified from

org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.compliance=1.5

into

org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.compliance=1.6

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to