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

Doxygen plugin treats path separators in output path incorrectly

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • doxygen-plugin
    • None
    • Windows 7 slave

      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:

          [JENKINS-9897] Doxygen plugin treats path separators in output path incorrectly

          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?

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

          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.

          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?

          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?

          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?

          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?

          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

          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

          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.

          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.

          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.

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

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

              Created:
              Updated: