Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14579

Cannot compile Jenkins source with generated Eclipse project because it's configured to be Java 5 compliant

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core, maven-plugin
    • None
    • Linux x86_64, Eclipse Classic 3.7.2, Sun JDK 6u27

      I've followed instructions at [1] and generated Eclipse projects to browse Jenkins source. Unfortunately, when I imported those projects into Eclipse, it turned out that jenkins-core and maven-plugin contain errors preventing them from compiling (and hence parsing) properly.

      When I clicked on the very first error it turned out that Eclipse complained about @Override annotation on the method implementing an interface. According to [2] this was NOT allowed in Java 5 and was first added in Java 6. I've used instructions on the same page to fix project settings for jenkins-core and maven-plugin to be Java 6 compliant at the source level, and all the errors were gone.

      Given that according to [1], JDK 6 is required to build Jenkins, and some Java 6 features are used in the code anyway, I don't see why generated projects try to be Java 5 compliant.

      [1] https://wiki.jenkins-ci.org/display/JENKINS/Building+Jenkins
      [2] http://stackoverflow.com/questions/8220786/java-eclipse-override-error

            Unassigned Unassigned
            mkalkov Mikhail Kalkov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: