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

Doxygen plugin treats path separators in output path incorrectly

    XMLWordPrintable

Details

    • Bug
    • Status: Reopened (View Workflow)
    • Major
    • Resolution: Unresolved
    • doxygen-plugin
    • None
    • Windows 7 slave

    Description

      For example, if the Doxyfile states:

      OUTPUT_DIRECTORY = build/doc
      

      publishing fails with:

      Publishing Doxygen HTML results.
      FATAL: error
      hudson.AbortException: The directory 'C:\Build\workspace\myProject\build/doc\html' doesn't exist.
      	at hudson.plugins.doxygen.DoxygenDirectoryParser.retrieveDoxygenDirectoryFromDoxyfile(DoxygenDirectoryParser.java:314)
      	at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:65)
      	at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:24)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1979)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:114)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:270)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:59)
      	at java.lang.Thread.run(Unknown Source)
      

      Note the backslash/forward slash confusion in hudson.AbortException.

      The cygwin version of doxygen correctly handles this Doxyfile. I have not tried any other Windows port.

      Similar Issues:

      Attachments

        Activity

          amebay Balazs MEZODI added a comment -

          Regarding the "The output directory doesn't exist" failure:

          It seems that the plugin assumes that the working directory of doxygen is the root folder of the workspace. Thus, the plugin tries to resolve all relative paths based on the root folder of the workspace.

          If you are like me, and your doxygen working directory is not the root folder of the workspace, then you need a workaround. I usually use one of these:

          • Change the working folder of doxygen to the root folder of the workspace.
          • Create a second Doxyfile (I usually name it Doxyfile.jenkins), in which you update all relative paths based on the root folder of the workspace. Then configure jenkins to use Doxyfile.jenkins, while maven (or whatever build tool you use) should stay using the original Doxyfile. (Yes, this solution means you need to keep the two files synchronized...)

          A suggestion: Perhaps an input field could be added to the plugin configuration, expecting the doxygen working directory.

          amebay Balazs MEZODI added a comment - Regarding the "The output directory doesn't exist" failure: It seems that the plugin assumes that the working directory of doxygen is the root folder of the workspace. Thus, the plugin tries to resolve all relative paths based on the root folder of the workspace. If you are like me, and your doxygen working directory is not the root folder of the workspace, then you need a workaround. I usually use one of these: Change the working folder of doxygen to the root folder of the workspace. Create a second Doxyfile (I usually name it Doxyfile.jenkins), in which you update all relative paths based on the root folder of the workspace. Then configure jenkins to use Doxyfile.jenkins, while maven (or whatever build tool you use) should stay using the original Doxyfile. (Yes, this solution means you need to keep the two files synchronized...) A suggestion: Perhaps an input field could be added to the plugin configuration, expecting the doxygen working directory.
          joe345 Joe Gamache added a comment -

          Hendrik,

          Could you enlighten the rest of us as to what you are talking about? "Start the doxygen tool" doesn't really say much, at least to me. I am having the same issue and am on a unix machine. Doxygen there does not appear to have any type of server process, so I can't figure out what "tool" you are starting. Is this a windows only thing?

          Thanks for providing some more detail.

          joe345 Joe Gamache added a comment - Hendrik, Could you enlighten the rest of us as to what you are talking about? "Start the doxygen tool" doesn't really say much, at least to me. I am having the same issue and am on a unix machine. Doxygen there does not appear to have any type of server process, so I can't figure out what "tool" you are starting. Is this a windows only thing? Thanks for providing some more detail.
          hendrik Hendrik Fuß added a comment -

          Hi,

          Again, I apologize for causing confusion. Here's for clarification:

          With "doxygen tool" I meant the command line client. When I first tried the Jenkins doxygen plugin I was a Jenkins newbie, and I wasn't aware of the fact that I had to take care of invoking doxygen myself using a build step. So in that respect the error message was completely justified – the output directory indeed wasn't there, because I failed to run doxygen.

          That's why I was saying, as far as I'm concerned, the issue can be closed.

          What would definitely help newbies like I've been, is to have some sort of step-by-step instructions on how to set up doxygen with Jenkins. Ie first create a new build step to run doxygen, second tick the check mark for the doxygen plugin etc. etc.

          cheers
          Hendrik

          hendrik Hendrik Fuß added a comment - Hi, Again, I apologize for causing confusion. Here's for clarification: With "doxygen tool" I meant the command line client. When I first tried the Jenkins doxygen plugin I was a Jenkins newbie, and I wasn't aware of the fact that I had to take care of invoking doxygen myself using a build step. So in that respect the error message was completely justified – the output directory indeed wasn't there, because I failed to run doxygen. That's why I was saying, as far as I'm concerned, the issue can be closed. What would definitely help newbies like I've been, is to have some sort of step-by-step instructions on how to set up doxygen with Jenkins. Ie first create a new build step to run doxygen, second tick the check mark for the doxygen plugin etc. etc. cheers Hendrik
          jenkins_user25 Jenkins User added a comment -

          I am seeing the same error:

          hudson.AbortException: The output directory doesn't exist.
          at hudson.plugins.doxygen.DoxygenDirectoryParser.retrieveDoxygenDirectoryFromDoxyfile(DoxygenDirectoryParser.java:343)

          My problem is OUTPUT_DIRECTORY in the doxyfile is set to an environment variable:

          OUTPUT_DIRECTORY = $(DOCDIR)

          echo $DOCDIR
          doxygen-doc

          However Jenkins' doxygen-plugin (I am using version 0.10) is not able to evaluate this environment variable while reading the doxyfile.

          What are my options to work around this issue?

          jenkins_user25 Jenkins User added a comment - I am seeing the same error: hudson.AbortException: The output directory doesn't exist. at hudson.plugins.doxygen.DoxygenDirectoryParser.retrieveDoxygenDirectoryFromDoxyfile(DoxygenDirectoryParser.java:343) My problem is OUTPUT_DIRECTORY in the doxyfile is set to an environment variable: OUTPUT_DIRECTORY = $(DOCDIR) echo $DOCDIR doxygen-doc However Jenkins' doxygen-plugin (I am using version 0.10) is not able to evaluate this environment variable while reading the doxyfile. What are my options to work around this issue?
          jenkins_user25 Jenkins User added a comment - - edited

          My mistake. Doxygen Plugin (0.10) already has a fix for this issue:

          It provides an 'advanced' button, after clicking this, a new field shows up titled:

          Folder from which doxygen is run
          (Give the path from where you run doxygen relative to the root of the workspace)

          I entered the value of OUTPUT_DIRECTORY (DOCDIR) here and doxygen documents were successfully being published after this.

          jenkins_user25 Jenkins User added a comment - - edited My mistake. Doxygen Plugin (0.10) already has a fix for this issue: It provides an 'advanced' button, after clicking this, a new field shows up titled: Folder from which doxygen is run (Give the path from where you run doxygen relative to the root of the workspace) I entered the value of OUTPUT_DIRECTORY (DOCDIR) here and doxygen documents were successfully being published after this.

          People

            gbois Gregory Boissinot
            hendrik Hendrik Fuß
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: