git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ALL][DBCP] JApiCmp blows up


Oh, then happens with both Maven 3.5.3 and 3.0.5:

Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297;
2018-02-24T12:49:05-07:00)
Maven home: C:\Java\apache-maven-3.5.3\bin\..
Java version: 1.8.0_172, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_172\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19
06:51:28-0700)
Maven home: C:\Java\apache-maven-3.0.5
Java version: 1.8.0_172, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_172\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"

Gary


On Tue, May 8, 2018 at 6:23 PM, Gary Gregory <garydgregory@xxxxxxxxx> wrote:

> Hi All,
>
> I ran into this building [DBCP] but I think it will apply to all
> components.
>
> Take the DBCP POM and turn on japicmp:
>
> diff --git a/pom.xml b/pom.xml
> index 65488de..106c314 100644
> --- a/pom.xml
> +++ b/pom.xml
> @@ -340,7 +340,7 @@
>  <!-- This is the only way I could find to skip generating this report -->
>  <!-- Version 0.11.1 throws an exception because it cannot find a Geronimo
> class -->
>  <!-- Version 0.12.0 throws an NullPointerException because it seems Maven
> did not inject the report Mojo with any values-->
> -<!--               <report>cmp-report</report> -->
> +              <report>cmp-report</report>
>              </reports>
>            </reportSet>
>          </reportSets>
>
> Then run:
>
> mvn -Dcommons.japicmp.version=0.12.0 -e site
>
> to get:
>
> [INFO] ------------------------------------------------------------
> ------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------
> ------------
> [INFO] Total time: 02:21 min
> [INFO] Finished at: 2018-05-08T18:22:57-06:00
> [INFO] ------------------------------------------------------------
> ------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7:site
> (default-site) on project commons-dbcp2: Error generating
> japicmp-maven-plugin:0.12.0:cmp-report report: Failed to generate report:
> null: NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.apache.maven.plugins:maven-site-plugin:3.7:site (default-site)
> on project commons-dbcp2: Error generating japicmp-maven-plugin:0.12.0:cmp-report
> report
>     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:56)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:498)
>     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 japicmp-maven-plugin:0.12.0:cmp-report report
>     at org.apache.maven.plugins.site.render.SiteMojo.execute
> (SiteMojo.java:141)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:137)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:208)
>     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:56)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:498)
>     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.reporting.MavenReportException: Failed to
> generate report: null
>     at japicmp.maven.JApiCmpReport.executeReport (JApiCmpReport.java:96)
>     at org.apache.maven.reporting.AbstractMavenReport.generate
> (AbstractMavenReport.java:255)
>     at org.apache.maven.plugins.site.render.ReportDocumentRenderer.renderDocument
> (ReportDocumentRenderer.java:230)
>     at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render
> (DefaultSiteRenderer.java:349)
>     at org.apache.maven.plugins.site.render.SiteMojo.renderLocale
> (SiteMojo.java:184)
>     at org.apache.maven.plugins.site.render.SiteMojo.execute
> (SiteMojo.java:133)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:137)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:208)
>     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:56)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:498)
>     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: java.lang.NullPointerException
>     at japicmp.maven.JApiCmpMojo.isPomModuleNeedingSkip
> (JApiCmpMojo.java:1243)
>     at japicmp.maven.JApiCmpMojo.executeWithParameters
> (JApiCmpMojo.java:130)
>     at japicmp.maven.JApiCmpReport.executeReport (JApiCmpReport.java:75)
>     at org.apache.maven.reporting.AbstractMavenReport.generate
> (AbstractMavenReport.java:255)
>     at org.apache.maven.plugins.site.render.ReportDocumentRenderer.renderDocument
> (ReportDocumentRenderer.java:230)
>     at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render
> (DefaultSiteRenderer.java:349)
>     at org.apache.maven.plugins.site.render.SiteMojo.renderLocale
> (SiteMojo.java:184)
>     at org.apache.maven.plugins.site.render.SiteMojo.execute
> (SiteMojo.java:133)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:137)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:208)
>     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:56)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:498)
>     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)
>
> It looks like Maven did not inject any of the ivars in the JApiCmd
> reporting Mojo.
>
> If you run with the japicmp plugin version 0.11.1, the you get a different
> error for which I've found no workaround.
>
> Thoughts?
>
> Gary
>