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

Doxygen plugin treats path separators in output path incorrectly

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: doxygen-plugin
    • Labels:
      None
    • Environment:
      Windows 7 slave
    • Similar Issues:

      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

          hendrik Hendrik Fuß created issue -
          gbois Gregory Boissinot made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          gbois Gregory Boissinot added a comment -

          Fixed in repository
          https://github.com/jenkinsci/doxygen-plugin
          Could you test it?

          Show
          gbois Gregory Boissinot added a comment - Fixed in repository https://github.com/jenkinsci/doxygen-plugin Could you test it?
          gbois Gregory Boissinot made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          hendrik Hendrik Fuß added a comment -

          Sorry for the delay. Was offline for a while. Is the fix already contained in the current release?

          Show
          hendrik Hendrik Fuß added a comment - Sorry for the delay. Was offline for a while. Is the fix already contained in the current release?
          Hide
          hendrik Hendrik Fuß added a comment -

          I've tried 0.9 and it still fails, this time with a different, less
          helpful error message:

          Publishing Doxygen HTML results.
          FATAL: error
          hudson.AbortException: The output directory doesn't exist.
          	at hudson.plugins.doxygen.DoxygenDirectoryParser.retrieveDoxygenDirectoryFromDoxyfile(DoxygenDirectoryParser.java:328)
          	at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:54)
          	at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:14)
          	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)
          

          The Doxyfile is unchanged and contains:

          OUTPUT_DIRECTORY       = build/doc
          

          The directory build/doc does exist in the workspace on the Windows slave that performs the build.

          Show
          hendrik Hendrik Fuß added a comment - I've tried 0.9 and it still fails, this time with a different, less helpful error message: Publishing Doxygen HTML results. FATAL: error hudson.AbortException: The output directory doesn't exist. at hudson.plugins.doxygen.DoxygenDirectoryParser.retrieveDoxygenDirectoryFromDoxyfile(DoxygenDirectoryParser.java:328) at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:54) at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:14) 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) The Doxyfile is unchanged and contains: OUTPUT_DIRECTORY = build/doc The directory build/doc does exist in the workspace on the Windows slave that performs the build.
          hendrik Hendrik Fuß made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          gbois Gregory Boissinot added a comment -

          Sorry the delay.
          The bug is still active.
          I don't have a suitable environment for reproduce it (such as Windows).
          Additionally, could you attach your Doxyfile?

          Show
          gbois Gregory Boissinot added a comment - Sorry the delay. The bug is still active. I don't have a suitable environment for reproduce it (such as Windows). Additionally, could you attach your Doxyfile?
          hendrik Hendrik Fuß made changes -
          Attachment Doxyfile [ 20626 ]
          Hide
          hendrik Hendrik Fuß added a comment -

          Attached!

          I would love to help with testing. The only problem is I am not set up for building hudson myself and I am not too familiar with the tools. If you can send me binaries of the plugin, I'd be happy to test it if that suits you.

          Show
          hendrik Hendrik Fuß added a comment - Attached! I would love to help with testing. The only problem is I am not set up for building hudson myself and I am not too familiar with the tools. If you can send me binaries of the plugin, I'd be happy to test it if that suits you.
          Hide
          hendrik Hendrik Fuß added a comment -

          I'm trying to forther diagnose the problem, and it seems that the problem in the current release (0.9) is not just the path separators: I've changed OUTPUT_DIRECTORY to just "doc" instead of "build/doc" and get a similar error message:

          Publishing Doxygen HTML results.
          FATAL: error
          hudson.AbortException: The output directory doesn't exist.
          	at hudson.plugins.doxygen.DoxygenDirectoryParser.retrieveDoxygenDirectoryFromDoxyfile(DoxygenDirectoryParser.java:328)
          	at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:54)
          	at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:14)
          	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1994)
          	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)
          Build step 'Publish Doxygen' changed build result to FAILURE
          

          I'm wondering: doesn't doxygen create the output directory itself? If it does then surely doxygen plugin doesn't need to probe for it?

          Show
          hendrik Hendrik Fuß added a comment - I'm trying to forther diagnose the problem, and it seems that the problem in the current release (0.9) is not just the path separators: I've changed OUTPUT_DIRECTORY to just "doc" instead of "build/doc" and get a similar error message: Publishing Doxygen HTML results. FATAL: error hudson.AbortException: The output directory doesn't exist. at hudson.plugins.doxygen.DoxygenDirectoryParser.retrieveDoxygenDirectoryFromDoxyfile(DoxygenDirectoryParser.java:328) at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:54) at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:14) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1994) 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) Build step 'Publish Doxygen' changed build result to FAILURE I'm wondering: doesn't doxygen create the output directory itself? If it does then surely doxygen plugin doesn't need to probe for it?
          Hide
          veroni Wiebke Timm added a comment -

          I have the same issue here (Jenkins 1.419, doxygen plugin 0.9):

          FATAL: error
          FATAL: error
          hudson.AbortException: The output directory doesn't exist.
                  [...same stacktrace as above...]
          

          My doxygen OUTPUT_DIRECTORY is set to '.' (without the quotes) in doxyfile.
          The Local module directory in the Jenkins job configuration is '.', too (without the quotes).
          Running doxygen in the checked out trunk/ directory myself creates an html/ directory below trunk/.

          What would be a correct output directory to put there?
          Any known way to circumvent the problem?

          Does this only work if the workspace is kept or does the plugin copy the documentation somewhere safe when publishing?

          Show
          veroni Wiebke Timm added a comment - I have the same issue here (Jenkins 1.419, doxygen plugin 0.9): FATAL: error FATAL: error hudson.AbortException: The output directory doesn't exist. [...same stacktrace as above...] My doxygen OUTPUT_DIRECTORY is set to '.' (without the quotes) in doxyfile. The Local module directory in the Jenkins job configuration is '.', too (without the quotes). Running doxygen in the checked out trunk/ directory myself creates an html/ directory below trunk/. What would be a correct output directory to put there? Any known way to circumvent the problem? Does this only work if the workspace is kept or does the plugin copy the documentation somewhere safe when publishing?
          Hide
          hendrik Hendrik Fuß added a comment -

          Hi,

          after another attempt, I have managed to get the plugin working on my system.

          My problem was a misunderstanding: I was expecting that the plugin to start the doxygen tool in order to generate the documentation output, something which the plugin does not do. After adding a build step to start doxygen, everything worked perfectly, even on a Windows slave.

          So, sorry for the confusion, but I believe this is not necessarily obvious to a new user. The same probably applies to javadoc.

          So, as far as I'm concerned the issue can be closed, unless other people are still having problems with this.

          cheers
          Hendrik

          Show
          hendrik Hendrik Fuß added a comment - Hi, after another attempt, I have managed to get the plugin working on my system. My problem was a misunderstanding: I was expecting that the plugin to start the doxygen tool in order to generate the documentation output, something which the plugin does not do. After adding a build step to start doxygen, everything worked perfectly, even on a Windows slave. So, sorry for the confusion, but I believe this is not necessarily obvious to a new user. The same probably applies to javadoc. So, as far as I'm concerned the issue can be closed, unless other people are still having problems with this. cheers Hendrik
          Hide
          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.

          Show
          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.
          Hide
          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.

          Show
          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.
          Hide
          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

          Show
          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
          Hide
          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?

          Show
          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?
          Hide
          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.

          Show
          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.
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 140083 ] JNJira + In-Review [ 186005 ]

            People

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

              Dates

              • Created:
                Updated: