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

Default JDK meaning in project options is confusing.

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None
    • Platform: HP, OS: Windows XP

      When the option for which JDK to use for native m2 builds is set to "default"
      and there is only one jdk configured in hudson the builds should use that jdk
      not the jdk/jre of the container.

      if there are more jdks' configured hudson should use the first one configured
      at the system level for default.

          [JENKINS-755] Default JDK meaning in project options is confusing.

          James Nord created issue -

          Maybe it's better off if we just get rid of this "default" thing altogether.
          Does it really buy us anything?

          If there's only one JDK configured in Hudson, I suppose we shouldn't even
          display the JDK selection drop-down and just stick to that JDK.

          Kohsuke Kawaguchi added a comment - Maybe it's better off if we just get rid of this "default" thing altogether. Does it really buy us anything? If there's only one JDK configured in Hudson, I suppose we shouldn't even display the JDK selection drop-down and just stick to that JDK.

          James Nord added a comment -

          Alternativly if you only have one that is the default, but if you have multiple
          then you can select which is the default.

          Then if you wish to upgrade and most of your jobs are using the default you can
          do it in just one place. (and let the projects that need a different jdk use it.)

          ALthough I guess you could do this already by calling a jdk install "latest" and
          just change the path to which jdk it uses...

          James Nord added a comment - Alternativly if you only have one that is the default, but if you have multiple then you can select which is the default. Then if you wish to upgrade and most of your jobs are using the default you can do it in just one place. (and let the projects that need a different jdk use it.) ALthough I guess you could do this already by calling a jdk install "latest" and just change the path to which jdk it uses...

          bimargulies added a comment -

          This problem seems more severe to me.

          I added a second JDK, and selected one of them for my project, and the project
          is still running with the JRE as JAVA_HOME instead of the JDK. I need the JDK.

          Either that or the maven-antrun-plugin is playing a nasty prank on me.

          bimargulies added a comment - This problem seems more severe to me. I added a second JDK, and selected one of them for my project, and the project is still running with the JRE as JAVA_HOME instead of the JDK. I need the JDK. Either that or the maven-antrun-plugin is playing a nasty prank on me.

          Ulli Hafner added a comment -

          The same should be done for the default maven version.

          I would expect that you can configure a list of tools in Hudson. For each tool, you have a default version (in the system configuration) that will be used if a job does not select a version in the job configuration. If it is easier to implement we can use the version at the top of the list (even though this is not so clear to the user). Another idea would be to have a 'Latest' list box entry, that would automatically use the latest available.

          Ulli Hafner added a comment - The same should be done for the default maven version. I would expect that you can configure a list of tools in Hudson. For each tool, you have a default version (in the system configuration) that will be used if a job does not select a version in the job configuration. If it is easier to implement we can use the version at the top of the list (even though this is not so clear to the user). Another idea would be to have a 'Latest' list box entry, that would automatically use the latest available.

          James Nord added a comment -

          WIth 1.389 I no longer see the ability to choose the JDK / Maven version if only one is installed - so as originally reported this is probably fixed (or my test setup is lacking something?).

          However Drulli's comment is valid that you may want a default and have jobs be able to choose that whatever it maps to.

          James Nord added a comment - WIth 1.389 I no longer see the ability to choose the JDK / Maven version if only one is installed - so as originally reported this is probably fixed (or my test setup is lacking something?). However Drulli's comment is valid that you may want a default and have jobs be able to choose that whatever it maps to.

          Ulli Hafner added a comment -

          That is interesting. I still have the default option, but only for freestyle projects and not m2 projects.

          Ulli Hafner added a comment - That is interesting. I still have the default option, but only for freestyle projects and not m2 projects.
          Nicolas De Loof made changes -
          Link New: This issue is related to JENKINS-10191 [ JENKINS-10191 ]
          kutzi made changes -
          Summary Original: Default JDK meening in project options is confusing. New: Default JDK meaning in project options is confusing.

          It would be nice to break this into two options: Default and System.
          Default would the the highest one on the list.
          System would use the system jdk.

          Why anyone would use System when Jenkins can manage the JDKs for you, I have no clue.

          Christian Höltje added a comment - It would be nice to break this into two options: Default and System. Default would the the highest one on the list. System would use the system jdk. Why anyone would use System when Jenkins can manage the JDKs for you, I have no clue.

            wilfredh Wilfred Hughes
            teilo James Nord
            Votes:
            48 Vote for this issue
            Watchers:
            49 Start watching this issue

              Created:
              Updated:
              Resolved: