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)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None

      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

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

          btrim added a comment -

          accidentally clicked in progress, sorry

          btrim added a comment - accidentally clicked in progress, sorry

          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.)

          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.)

          Fixed in 1.397 thanks to lacostej

          Kohsuke Kawaguchi added a comment - Fixed in 1.397 thanks to lacostej

          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.

          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.

          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

          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

          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

          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

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

              Created:
              Updated:
              Resolved: