Tapestry 5
  1. Tapestry 5
  2. TAP5-871

Generation of Component Reference failed on Windows

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.5
    • Fix Version/s: 5.2.0
    • Labels:
      None

      Description

      The maven site generation on my CI machine (which is running Linux) works well while using the tapestry-component-report plugin. If I try to stage the site on my windows development machine I encounter the following error during

      mvn site:stage -DstagingDirectory=C:\fullsite

      ......
      [INFO] Cobertura Report generation was successful.
      [INFO] Generating "Component Reference" report.
      [INFO] Running JavaDoc to collect component parameter data ...
      1 error
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error during page generation

      Embedded error: Error rendering Maven report: Javadoc exit code: 1 - javadoc: error - Cannot find doclet class org.apache.tapestry.mojo.ParametersDocl
      et

      Command line was: cmd.exe /X /C "c:\Programme\Java\jdk1.5.0_17\jre\..\bin\javadoc.exe @target/component-report-javadoc-arguments.txt"
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch

      I have tried to change all path entrys in the generated file component-report-javadoc-arguments.txt from '\' to '/' and executed the failing command line manually. Javadoc worked with the modified file. The generation of said file should be changed to a different path seperator.

      1. TAP5-871.patch
        0.9 kB
        Christophe Cordenier
      2. component_report_patch.patch
        0.7 kB
        Ville Virtanen
      3. component_report.zip
        25 kB
        Ville Virtanen

        Issue Links

          Activity

          Hide
          Ville Virtanen added a comment - - edited

          Just ran in to this problem and got too frustrated, so I just rolled my own.. Attached is zip that contains corrected version of tapestry-component-report. You can copy it to your .m2 directory to the correct location and then you are on your way.

          Ugly solution was to replace

          builder.append(path);
          to
          if(SystemUtils.IS_OS_WINDOWS)

          { builder.append(path.replace("\\", "/")); }

          else

          { builder.append(path); }

          in line 839 in ComponentReport.java. This results corrected component-report-javadoc-arguments.txt file in windows but leaves the generation untouched in other platforms.

          Also attached patch that corrects this problem.

          Show
          Ville Virtanen added a comment - - edited Just ran in to this problem and got too frustrated, so I just rolled my own.. Attached is zip that contains corrected version of tapestry-component-report. You can copy it to your .m2 directory to the correct location and then you are on your way. Ugly solution was to replace builder.append(path); to if(SystemUtils.IS_OS_WINDOWS) { builder.append(path.replace("\\", "/")); } else { builder.append(path); } in line 839 in ComponentReport.java. This results corrected component-report-javadoc-arguments.txt file in windows but leaves the generation untouched in other platforms. Also attached patch that corrects this problem.
          Hide
          Christophe Cordenier added a comment -

          What about calling a Java escape before append

          builder.append(StringEscapeUtils.escapeJava(path));

          Work on windows, i guess this will have no effect on Unix...

          Patch attached.

          Show
          Christophe Cordenier added a comment - What about calling a Java escape before append builder.append(StringEscapeUtils.escapeJava(path)); Work on windows, i guess this will have no effect on Unix... Patch attached.
          Hide
          Christophe Cordenier added a comment -

          Patch committed.

          Show
          Christophe Cordenier added a comment - Patch committed.
          Hide
          Hudson added a comment -

          Integrated in tapestry-5.2-freestyle #170 (See http://hudson.zones.apache.org/hudson/job/tapestry-5.2-freestyle/170/)

          Show
          Hudson added a comment - Integrated in tapestry-5.2-freestyle #170 (See http://hudson.zones.apache.org/hudson/job/tapestry-5.2-freestyle/170/ )

            People

            • Assignee:
              Christophe Cordenier
              Reporter:
              Armin Rauch
            • Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development