Maven JXR
  1. Maven JXR
  2. JXR-37

Jxr plugin fails if xdoclet executed without sources generation

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: maven2 jxr plugin
    • Labels:
      None
    • Number of attachments :
      1

      Description

      JXR plugin always tries to find directory "target/generated-sources/xdoclet" if a xdoclet execution is set. For instance, if a webdoclet task is used, no "target/generated-sources/xdoclet" directory should be created, resulting in a build error.

        Activity

        Hide
        Fernando Lindner added a comment -

        error log for "mvn site" execution, using a webdoclet task:

        [INFO] ------------------------------------------------------------------------
        [ERROR] BUILD ERROR
        [INFO] ------------------------------------------------------------------------
        [INFO] Error during page generation

        Embedded error: Error rendering Maven report: Error while generating the HTML source code of the projet.
        basedir C:\projects\myProject\web\target\generated-sources\xdoclet does not exist

        Show
        Fernando Lindner added a comment - error log for "mvn site" execution, using a webdoclet task: [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error during page generation Embedded error: Error rendering Maven report: Error while generating the HTML source code of the projet. basedir C:\projects\myProject\web\target\generated-sources\xdoclet does not exist
        Hide
        Jörg Prante added a comment -

        This is a very annoying bug!

        mvn release:perform is no longer possible without disabling the plugin.

        Show
        Jörg Prante added a comment - This is a very annoying bug! mvn release:perform is no longer possible without disabling the plugin.
        Hide
        Dennis Lundberg added a comment -

        Can someone please provide an example pom.xml for this issue?

        Show
        Dennis Lundberg added a comment - Can someone please provide an example pom.xml for this issue?
        Hide
        Fernando Lindner added a comment -

        Dennis,
        here comes a build tag example for this bug (It includes the workaround):

         
              ...
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>xdoclet-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>xdoclet</goal>
                                </goals>
                                <configuration>
                                    <tasks>
                                        <!-- start: workaround for MJXR-21 -->
                                        <mkdir dir = "${project.build.directory}/generated-sources/xdoclet"/>
                                        <!-- end: workaround for MJXR-21 -->
                                        <webdoclet destdir = "${project.build.directory}/${project.build.finalName}/WEB-INF">
                                            <fileset dir = "src/main/java">
                                                <include name = "**/*.java"/>
                                            </fileset>
                                            <strutsconfigxml
                                                version = "1.1"
                                                destDir = "${project.build.directory}/${project.build.finalName}/WEB-INF"
                                                mergeDir = "src/main/config/xdoclet-merge"/>
                                        </webdoclet>
                                    </tasks>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
             ...
        
        Show
        Fernando Lindner added a comment - Dennis, here comes a build tag example for this bug (It includes the workaround): ... <build> <plugins> <plugin> <groupId> org.codehaus.mojo </groupId> <artifactId> xdoclet-maven-plugin </artifactId> <executions> <execution> <phase> generate-sources </phase> <goals> <goal> xdoclet </goal> </goals> <configuration> <tasks> <!-- start: workaround for MJXR-21 --> <mkdir dir = "${project.build.directory}/generated-sources/xdoclet" /> <!-- end: workaround for MJXR-21 --> <webdoclet destdir = "${project.build.directory}/${project.build.finalName}/WEB-INF" > <fileset dir = "src/main/java" > <include name = "**/*.java" /> </fileset> <strutsconfigxml version = "1.1" destDir = "${project.build.directory}/${project.build.finalName}/WEB-INF" mergeDir = "src/main/config/xdoclet-merge" /> </webdoclet> </tasks> </configuration> </execution> </executions> </plugin> </plugins> </build> ...
        Hide
        Dennis Lundberg added a comment -

        Here's a complete test project based on Fernando's webdoclet config. When I run

        mvn site

        on this project it works without any errors. Note that the workaround has been commented out in the pom.

        Unless someone can produce a complete test-case for this I am going to postpone this issue to a later release.

        Show
        Dennis Lundberg added a comment - Here's a complete test project based on Fernando's webdoclet config. When I run mvn site on this project it works without any errors. Note that the workaround has been commented out in the pom. Unless someone can produce a complete test-case for this I am going to postpone this issue to a later release.
        Hide
        Patrice Bertrand added a comment -

        mvn site by istelf runs fine.

        The problem occurs when the site is built during a mvn release:perform.

        Show
        Patrice Bertrand added a comment - mvn site by istelf runs fine. The problem occurs when the site is built during a mvn release:perform.
        Hide
        Fernando Lindner added a comment -

        Dennis,
        Looking in your test project I got the solution for this issue: we are using different jxr plugin distributions.

        My reporting/plugins tag was using the same artifactId and groupId from build/plugins tag (mojo):

         
           ...
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>jxr-maven-plugin</artifactId>
                    </plugin>
           ...
        

        I changed to your sample project plugin configuration that uses a different groupId and artifactId in the reporting/plugin tag:

         
           ...
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jxr-plugin</artifactId>
                    </plugin>
           ...
        

        Now my project is generating site without workaround.

        Thanks a lot, I'll close the issue now.

        Show
        Fernando Lindner added a comment - Dennis, Looking in your test project I got the solution for this issue: we are using different jxr plugin distributions. My reporting/plugins tag was using the same artifactId and groupId from build/plugins tag (mojo): ... <plugin> <groupId> org.codehaus.mojo </groupId> <artifactId> jxr-maven-plugin </artifactId> </plugin> ... I changed to your sample project plugin configuration that uses a different groupId and artifactId in the reporting/plugin tag: ... <plugin> <groupId> org.apache.maven.plugins </groupId> <artifactId> maven-jxr-plugin </artifactId> </plugin> ... Now my project is generating site without workaround. Thanks a lot, I'll close the issue now.
        Hide
        Fernando Lindner added a comment -

        Error occurs only in org.codehaus.mojo distribution plugin.

        Show
        Fernando Lindner added a comment - Error occurs only in org.codehaus.mojo distribution plugin.

          People

          • Assignee:
            Unassigned
            Reporter:
            Fernando Lindner
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: