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

DoxygenDirectoryParser#isDirectoryAbsolute() can get confused and cause the doxygen OUTPUT_DIR not to be found

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • doxygen-plugin
    • None

      We have a doxygen.conf file where OUTPUT_DIRECTORY = doc. The doxygen html files were generated properly under ${workspace}/doc/html however the plugin kept on saying it couldn't find the directory.

      After tracing in to the code, I think I see the problem. DoxygenDirectoryParser#isDirectoryAbsolute() checks to see if the passed in path is absolute by seeing if the path's parent exists.

      If we pass in "doc" you would expext isDirectoryAbsolute() to return false. However, in our environment, ${user.dir}/doc actually does exist.

      From http://docs.oracle.com/javase/6/docs/api/java/io/File.html, "By default the classes in the java.io package always resolve relative pathnames against the current user directory. This directory is named by the system property user.dir, and is typically the directory in which the Java virtual machine was invoked."

      For Unix environments, I'm thinking we can just check to see if the path starts with a "/" to see if a directory is absolute. However, for Windows environments, the check will have to include checking for drive letter names and UNC paths.

          [JENKINS-13599] DoxygenDirectoryParser#isDirectoryAbsolute() can get confused and cause the doxygen OUTPUT_DIR not to be found

          Code changed in jenkins
          User: Albert So
          Path:
          src/test/java/hudson/plugins/doxygen/DoxygenDirectoryParserTest.java
          http://jenkins-ci.org/commit/doxygen-plugin/78e416c86cf0679e8f305679cdc48b1a6f74170c
          Log:
          JENKINS-13599 Provided better implementation of
          DoxygenDirectoryParser#isDirectoryAbsolute(). The previous implementation would
          incorrectly think that doc was absolute because java.io.File found /home/y/doc

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Albert So Path: src/test/java/hudson/plugins/doxygen/DoxygenDirectoryParserTest.java http://jenkins-ci.org/commit/doxygen-plugin/78e416c86cf0679e8f305679cdc48b1a6f74170c Log: JENKINS-13599 Provided better implementation of DoxygenDirectoryParser#isDirectoryAbsolute(). The previous implementation would incorrectly think that doc was absolute because java.io.File found /home/y/doc

          Code changed in jenkins
          User: Albert So
          Path:
          src/main/java/hudson/plugins/doxygen/DoxygenDirectoryParser.java
          http://jenkins-ci.org/commit/doxygen-plugin/ea6de1eef23d6d57de5f1e3be469771e8398472a
          Log:
          JENKINS-13599 Provided better implementation of
          DoxygenDirectoryParser#isDirectoryAbsolute(). The previous implementation would
          incorrectly think that doc was absolute because java.io.File found /home/y/doc

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Albert So Path: src/main/java/hudson/plugins/doxygen/DoxygenDirectoryParser.java http://jenkins-ci.org/commit/doxygen-plugin/ea6de1eef23d6d57de5f1e3be469771e8398472a Log: JENKINS-13599 Provided better implementation of DoxygenDirectoryParser#isDirectoryAbsolute(). The previous implementation would incorrectly think that doc was absolute because java.io.File found /home/y/doc

          Code changed in jenkins
          User: Albert So
          Path:
          src/main/java/hudson/plugins/doxygen/DoxygenDirectoryParser.java
          http://jenkins-ci.org/commit/doxygen-plugin/1e5d55542d9fbabe3ddfc1e5b3d5de4ce87f92ce
          Log:
          JENKINS-13599 Added more logging to help debug problems dealing with the plugin not finding the doxygen html directory

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Albert So Path: src/main/java/hudson/plugins/doxygen/DoxygenDirectoryParser.java http://jenkins-ci.org/commit/doxygen-plugin/1e5d55542d9fbabe3ddfc1e5b3d5de4ce87f92ce Log: JENKINS-13599 Added more logging to help debug problems dealing with the plugin not finding the doxygen html directory

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/hudson/plugins/doxygen/DoxygenDirectoryParser.java
          src/test/java/hudson/plugins/doxygen/DoxygenDirectoryParserTest.java
          http://jenkins-ci.org/commit/doxygen-plugin/82a31e40096a95b3aed8351e4902aab9c7377fa8
          Log:
          Merge pull request #4 from albert-so/master

          JENKINS-13599 Provided better implementation of DoxygenDirectoryParser#isDirectoryAbsolute().

          Compare: https://github.com/jenkinsci/doxygen-plugin/compare/f14d86f...82a31e4

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/hudson/plugins/doxygen/DoxygenDirectoryParser.java src/test/java/hudson/plugins/doxygen/DoxygenDirectoryParserTest.java http://jenkins-ci.org/commit/doxygen-plugin/82a31e40096a95b3aed8351e4902aab9c7377fa8 Log: Merge pull request #4 from albert-so/master JENKINS-13599 Provided better implementation of DoxygenDirectoryParser#isDirectoryAbsolute(). Compare: https://github.com/jenkinsci/doxygen-plugin/compare/f14d86f...82a31e4

            kingfai Albert So
            kingfai Albert So
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: