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

Jenkins 396 still uses $(user.home)/.hudson as default when ran using executable war (java -jar jenkins.war)

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      Afte moving my ~/.hudson to ~/.jenkins and starting jenkins using

      java -jar jenkins.war

      I've noticed jenkins 1.396 wasn't picking the new location.

      Issue seems to come from http://grepcode.com/file/repo1.maven.org/maven2/org.jvnet.hudson/executable-war/1.17/Main.java#Main.getHomeDir%28%29

      the getHomeDir is duplicated in the org.jvnet.hudson:executable-war Main class, causing winstone to extract the war before using the core/src/main/java/hudson/WebAppMain.java class

        Attachments

          Activity

          Hide
          btrim btrim added a comment -

          accidentally clicked in progress, sorry

          Show
          btrim btrim added a comment - accidentally clicked in progress, sorry
          Hide
          lacostej lacostej added a comment -

          I didn't find a git repo for the extras/executable-war. Here's the patch against SVN.

          Note that the patch contains:

          • the fix
          • the same troubleshooting code I introduced in the following git pull https://github.com/jenkinsci/jenkins/pull/27
          • a migration to java 1.5 and a removal of the catch for 1.4 related issues. This allows to make both WebAppMain.getHomeDir and Main.getHomeDir a bit more similar.

          You may or you may not want to add all this debug code (I think it might help troubleshoot other people's installs.)

          Show
          lacostej lacostej added a comment - I didn't find a git repo for the extras/executable-war. Here's the patch against SVN. Note that the patch contains: the fix the same troubleshooting code I introduced in the following git pull https://github.com/jenkinsci/jenkins/pull/27 a migration to java 1.5 and a removal of the catch for 1.4 related issues. This allows to make both WebAppMain.getHomeDir and Main.getHomeDir a bit more similar. You may or you may not want to add all this debug code (I think it might help troubleshoot other people's installs.)
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Fixed in 1.397 thanks to lacostej

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Fixed in 1.397 thanks to lacostej
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jerome Lacoste
          Path:
          core/src/main/java/hudson/WebAppMain.java
          http://jenkins-ci.org/commit/core/4f857bccb7b000fbc6067ad8f99c7ef04beba8fd
          Log:
          JENKINS-8658 let getHomeDir gather information about where it finds its location. Useful for troubleshooting.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jerome Lacoste Path: core/src/main/java/hudson/WebAppMain.java http://jenkins-ci.org/commit/core/4f857bccb7b000fbc6067ad8f99c7ef04beba8fd Log: JENKINS-8658 let getHomeDir gather information about where it finds its location. Useful for troubleshooting.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jerome Lacoste
          Path:
          core/src/main/java/hudson/WebAppMain.java
          http://jenkins-ci.org/commit/core/42c0bdb7034af18809daa217664e9a6ec062ceab
          Log:
          JENKINS-8658 cleanup. Inner class can be static

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jerome Lacoste Path: core/src/main/java/hudson/WebAppMain.java http://jenkins-ci.org/commit/core/42c0bdb7034af18809daa217664e9a6ec062ceab Log: JENKINS-8658 cleanup. Inner class can be static
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jerome Lacoste
          Path:
          war/pom.xml
          http://jenkins-ci.org/commit/core/5150e710a8e744a4fcecb4b4ebffbda9ac53deb8
          Log:
          JENKINS-8658 depend on latest executable-war. This is where the fix should be. Note: of course one should release that dependency into a stable version

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jerome Lacoste Path: war/pom.xml http://jenkins-ci.org/commit/core/5150e710a8e744a4fcecb4b4ebffbda9ac53deb8 Log: JENKINS-8658 depend on latest executable-war. This is where the fix should be. Note: of course one should release that dependency into a stable version

            People

            • Assignee:
              Unassigned
              Reporter:
              lacostej lacostej
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: