Uploaded image for project: 'Maven Site Plugin'
  1. Maven Site Plugin
  2. MSITE-797

simplify stacktrace in case of report plugin execution failure

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.6
    • 3.7
    • doxia integration
    • None

    Description

      currentmy, maven-site-plugin encapsulates o.a.m.reporting.MavenReportException into o.a.m.doxia.siterenderer.RendererException, which is then encapsulated into o.a.m.plugin.MojoExecutionException, for example in it/failure/report-plugin-debug.log:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7-SNAPSHOT:site (default-site) on project failure-it: Error generating maven-changelog-plugin:2.2:dev-activity: Cannot run changelog command : Can't load the scm provider. SCM Connection is not set. -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7-SNAPSHOT:site (default-site) on project failure-it: Error generating maven-changelog-plugin:2.2:dev-activity: Cannot run changelog command : 
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Error generating maven-changelog-plugin:2.2:dev-activity: Cannot run changelog command : 
      	at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:137)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	... 20 more
      Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error generating maven-changelog-plugin:2.2:dev-activity: Cannot run changelog command : 
      	at org.apache.maven.plugins.site.render.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:244)
      	at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:337)
      	at org.apache.maven.plugins.site.render.SiteMojo.renderLocale(SiteMojo.java:178)
      	at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:132)
      	... 22 more
      Caused by: org.apache.maven.reporting.MavenReportException: Cannot run changelog command : 
      	at org.apache.maven.plugin.changelog.ChangeLogReport.generateChangeSetsFromSCM(ChangeLogReport.java:706)

      o.a.m.doxia.siterenderer.RendererException is really unnecessary and just causes confusion since there is no issue in Doxia Siterenderer. Removing this layer could give something more clear:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7-SNAPSHOT:site (default-site) on project failure-it: Error generating maven-changelog-plugin:2.2:dev-activity: Cannot run changelog command : Can't load the scm provider. SCM Connection is not set. -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7-SNAPSHOT:site (default-site) on project failure-it: Error generating maven-changelog-plugin:2.2:dev-activity
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Error generating maven-changelog-plugin:2.2:dev-activity:
      	at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:137)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	... 20 more
      Caused by: org.apache.maven.reporting.MavenReportException: Cannot run changelog command : 
      	at org.apache.maven.plugin.changelog.ChangeLogReport.generateChangeSetsFromSCM(ChangeLogReport.java:706)

      Attachments

        Activity

          People

            hboutemy Herve Boutemy
            hboutemy Herve Boutemy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: