I'm currently packaging Jenkins (https://github.com/jenkinsci/jenkins/tree/jenkins-1_396 for a tarball) for Ubuntu and I've come across the following issue when compiling jenkins-core:
/home/jamespage/src/hudson/github/build-area/jenkins-1.396/core/src/main/java/hudson/model/Build.java:[80,16] types hudson.model.AbstractBuild<P,B> and hudson.model.AbstractBuild<P,B> are incompatible; both define getParent(), but with unrelated return types
/home/jamespage/src/hudson/github/build-area/jenkins-1.396/core/src/main/java/hudson/model/FreeStyleBuild.java:[35,7] types hudson.model.Build<hudson.model.FreeStyleProject,hudson.model.FreeStyleBuild> and hudson.model.Build<hudson.model.FreeStyleProject,hudson.model.FreeStyleBuild> are incompatible; both define getParent(), but with unrelated return types
This is on natty (OpenJDK version below).
java version "1.6.0_21"
OpenJDK Runtime Environment (IcedTea6 1.10pre) (6b21~pre1-0ubuntu2)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
Compiling with the Sun JDK from the partner repository works successfully.
I also get a similar issue on Maverick:
/home/jamespage/src/hudson/github/normal/jenkinsci-jenkins-653b030/core/src/main/java/hudson/model/Build.java:[80,16] types hudson.model.AbstractBuild<P,B> and hudson.model.AbstractBuild<P,B> are incompatible; both define getParent(), but with unrelated return types
/home/jamespage/src/hudson/github/normal/jenkinsci-jenkins-653b030/core/src/main/java/hudson/matrix/MatrixBuild.java:[60,7] types hudson.model.AbstractBuild<hudson.matrix.MatrixProject,hudson.matrix.MatrixBuild> and hudson.model.AbstractBuild<hudson.matrix.MatrixProject,hudson.matrix.MatrixBuild> are incompatible; both define getParent(), but with unrelated return types
/home/jamespage/src/hudson/github/normal/jenkinsci-jenkins-653b030/core/src/main/java/hudson/model/FreeStyleBuild.java:[35,7] types hudson.model.Build<hudson.model.FreeStyleProject,hudson.model.FreeStyleBuild> and hudson.model.Build<hudson.model.FreeStyleProject,hudson.model.FreeStyleBuild> are incompatible; both define getParent(), but with unrelated return types
This feels like a difference between the way the Sun JDK and OpenJDK handle generics.
Something that sounds like a similar issue: Under OpenJDK, when trying to compile https:/ /github. com/sk89q/ worldguard (commit 49bdccf020 currently), I get
[INFO] Compilation failure Coding/ bukkit/ worldguard/ src/main/ java/com/ sk89q/worldguar d/protection/ ApplicableRegio nSet.java: [277,26] put(com. sk89q.worldguar d.protection. regions. ProtectedRegion ,V) in java.util. Map<com. sk89q.worldguar d.protection. regions. ProtectedRegion ,V> cannot be applied to (com.sk89q. worldguard. protection. regions. ProtectedRegion ,java.lang. Object)
/home/chris/
but with the Sun JDK this error doesn't happen.