Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 3.3
    • Component/s: Plugin Plugin
    • Labels:
      None
    • Environment:
      Maven 3.x

      Description

      During running maven-plugin-plugin:report the following exception occurs:

      Caused by: java.lang.NoClassDefFoundError: org/apache/maven/doxia/module/xhtml/decoration/render/RenderingContext
      	at org.apache.maven.reporting.sink.SinkFactory.createSink(SinkFactory.java:59)
      	at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:85)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      	... 20 more
      Caused by: java.lang.ClassNotFoundException: org.apache.maven.doxia.module.xhtml.decoration.render.RenderingContext
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
      	... 23 more

      After some debugging it seams to me that the cause is the version of maven-reporting-impl dependency which is now 2.0.5. I made it work with the following snippet in my pom.xml:

      			<plugin>
      				<groupId>org.apache.maven.plugins</groupId>
      				<artifactId>maven-plugin-plugin</artifactId>
      				<version>2.9</version>
      				<executions>
      					<execution>
      						<id>report</id>
      						<phase>pre-site</phase>
      						<goals>
      							<goal>report</goal>
      						</goals>
      					</execution>
      				</executions>
      				<dependencies>
      					<dependency>
      						<groupId>org.apache.maven.reporting</groupId>
      						<artifactId>maven-reporting-impl</artifactId>
      						<version>2.2</version>
      					</dependency>
      				</dependencies>
      			</plugin>

      After this setting the plugin-info.html file is generated at target/generated-site/xdoc directory. However nothing is copied to target/site as the output file should be moved to target/generated-site/xhtml and it should have the extension .xhtml.vm.

      I made the workaround that I copy and rename the html file to src/site/xhtml/plugin-info.xhtml.vm.

        Issue Links

          Activity

          Balazs Zsoldos created issue -
          Hide
          Andreas Horst added a comment -

          Reproduced the same problem and fix in our Maven plugin project.

          Show
          Andreas Horst added a comment - Reproduced the same problem and fix in our Maven plugin project.
          Robert Scholte made changes -
          Field Original Value New Value
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Duplicate [ 3 ]
          Assignee Robert Scholte [ rfscholte ]
          Robert Scholte made changes -
          Link This issue duplicates MPLUGIN-187 [ MPLUGIN-187 ]
          Hervé Boutemy made changes -
          Description During running maven-plugin-plugin:report the following exception occurs:

          Caused by: java.lang.NoClassDefFoundError: org/apache/maven/doxia/module/xhtml/decoration/render/RenderingContext
          at org.apache.maven.reporting.sink.SinkFactory.createSink(SinkFactory.java:59)
          at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:85)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
          ... 20 more
          Caused by: java.lang.ClassNotFoundException: org.apache.maven.doxia.module.xhtml.decoration.render.RenderingContext
          at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
          ... 23 more

          After some debugging it seams to me that the cause is the version of maven-reporting-impl dependency which is now 2.0.5. I made it work with the following snippet in my pom.xml:

          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>2.9</version>
          <executions>
          <execution>
          <id>report</id>
          <phase>pre-site</phase>
          <goals>
          <goal>report</goal>
          </goals>
          </execution>
          </executions>
          <dependencies>
          <dependency>
          <groupId>org.apache.maven.reporting</groupId>
          <artifactId>maven-reporting-impl</artifactId>
          <version>2.2</version>
          </dependency>
          </dependencies>
          </plugin>

          After this setting the plugin-info.html file is generated at target/generated-site/xdoc directory. However nothing is copied to target/site as the output file should be moved to target/generated-site/xhtml and it should have the extension .xhtml.vm.

          I made the workaround that I copy and rename the html file to src/site/xhtml/plugin-info.xhtml.vm.
          During running maven-plugin-plugin:report the following exception occurs:

          {noformat}Caused by: java.lang.NoClassDefFoundError: org/apache/maven/doxia/module/xhtml/decoration/render/RenderingContext
          at org.apache.maven.reporting.sink.SinkFactory.createSink(SinkFactory.java:59)
          at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:85)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
          ... 20 more
          Caused by: java.lang.ClassNotFoundException: org.apache.maven.doxia.module.xhtml.decoration.render.RenderingContext
          at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
          ... 23 more{noformat}

          After some debugging it seams to me that the cause is the version of maven-reporting-impl dependency which is now 2.0.5. I made it work with the following snippet in my pom.xml:

          {code:xml} <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>2.9</version>
          <executions>
          <execution>
          <id>report</id>
          <phase>pre-site</phase>
          <goals>
          <goal>report</goal>
          </goals>
          </execution>
          </executions>
          <dependencies>
          <dependency>
          <groupId>org.apache.maven.reporting</groupId>
          <artifactId>maven-reporting-impl</artifactId>
          <version>2.2</version>
          </dependency>
          </dependencies>
          </plugin>{code}

          After this setting the plugin-info.html file is generated at target/generated-site/xdoc directory. However nothing is copied to target/site as the output file should be moved to target/generated-site/xhtml and it should have the extension .xhtml.vm.

          I made the workaround that I copy and rename the html file to src/site/xhtml/plugin-info.xhtml.vm.
          Hide
          Balazs Zsoldos added a comment - - edited

          Half of the issue is solved. The plugin still generates plugin-info.html into targate/generated-site/xdoc although this file is not an xdoc but an xhtml.vm. Due to this reason the plugin-info.html is not in the finally generated site. Tested with the version 3.1.

          Show
          Balazs Zsoldos added a comment - - edited Half of the issue is solved. The plugin still generates plugin-info.html into targate/generated-site/xdoc although this file is not an xdoc but an xhtml.vm. Due to this reason the plugin-info.html is not in the finally generated site. Tested with the version 3.1.
          zs_b made changes -
          Resolution Duplicate [ 3 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Hide
          badgers added a comment -

          Just confirming the above behaviour seen by Balazs Zsoldos on 10/Oct/12. Testing on one of our plugins that is dependent on maven-plugin-plugin 3.2. Below is a snippet from our POM. The build is running on Maven 3.0.4.

            <build>
              <pluginManagement>
                <plugins>
                  <plugin>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.2</version>
                  </plugin>
                </plugins>
              </pluginManagement>
              <plugins>
                <plugin>
                  <artifactId>maven-plugin-plugin</artifactId>
                  <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                  </configuration>
                  <executions>
                    <execution>
                      <id>mojo-descriptor</id>
                      <phase>process-classes</phase>
                      <goals>
                        <goal>descriptor</goal>
                      </goals>
                    </execution>
                    <execution>
                      <id>report</id>
                      <phase>pre-site</phase>
                      <goals>
                        <goal>report</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>
              </plugins>
            </build>
          
            <reporting>
              <plugins>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-plugin-plugin</artifactId>
                  <version>3.2</version>
                </plugin>
              </plugins>
            </reporting>
          
          Show
          badgers added a comment - Just confirming the above behaviour seen by Balazs Zsoldos on 10/Oct/12. Testing on one of our plugins that is dependent on maven-plugin-plugin 3.2. Below is a snippet from our POM. The build is running on Maven 3.0.4. <build> <pluginManagement> <plugins> <plugin> <artifactId> maven-plugin-plugin </artifactId> <version> 3.2 </version> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <artifactId> maven-plugin-plugin </artifactId> <configuration> <skipErrorNoDescriptorsFound> true </skipErrorNoDescriptorsFound> </configuration> <executions> <execution> <id> mojo-descriptor </id> <phase> process-classes </phase> <goals> <goal> descriptor </goal> </goals> </execution> <execution> <id> report </id> <phase> pre-site </phase> <goals> <goal> report </goal> </goals> </execution> </executions> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId> org.apache.maven.plugins </groupId> <artifactId> maven-plugin-plugin </artifactId> <version> 3.2 </version> </plugin> </plugins> </reporting>
          Hide
          Robert Scholte added a comment -

          closing as duplicate of MPLUGIN-187

          Show
          Robert Scholte added a comment - closing as duplicate of MPLUGIN-187
          Robert Scholte made changes -
          Resolution Duplicate [ 3 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          Hide
          Robert Scholte added a comment -

          I just notices that the original issue was solved, but there's a related issue. Reopening...

          Show
          Robert Scholte added a comment - I just notices that the original issue was solved, but there's a related issue. Reopening...
          Robert Scholte made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Resolution Duplicate [ 3 ]
          Hide
          Robert Scholte added a comment -

          Fixed in r1588642

          Show
          Robert Scholte added a comment - Fixed in r1588642
          Robert Scholte made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Fix Version/s 3.3 [ 18959 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 12:08:28 UTC 2015 [ 1428235708524 ]
          Mark Thomas made changes -
          Workflow jira [ 12723177 ] Default workflow, editable Closed status [ 12756248 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 00:41:51 UTC 2015 [ 1428280911727 ]
          Mark Thomas made changes -
          Workflow jira [ 12960712 ] Default workflow, editable Closed status [ 12997278 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          32d 18h 10m 1 Robert Scholte 20/Apr/12 13:33
          Closed Closed Reopened Reopened
          172d 17h 17m 2 Robert Scholte 18/Apr/14 14:57
          Reopened Reopened Closed Closed
          555d 23h 42m 2 Robert Scholte 19/Apr/14 06:32

            People

            • Assignee:
              Robert Scholte
              Reporter:
              Balazs Zsoldos
            • Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development