maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Short (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MCHECKSTYLE-333) Intermittent NPE on checkstyle:check
Date Fri, 13 Jan 2017 20:43:26 GMT
James Short created MCHECKSTYLE-333:
---------------------------------------

             Summary: Intermittent NPE on checkstyle:check
                 Key: MCHECKSTYLE-333
                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-333
             Project: Maven Checkstyle Plugin
          Issue Type: Bug
         Environment: OSX El Captain, maven 3.x, maven checkstyle plugin 2.7, checkstyle 6.19
            Reporter: James Short


I generally run checkstyle:check manually but I wanted to integrate it into the validate phase
of my root build.

After doing this, it will intermittent fail with an NPE:

{code}
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check
(checkstyle) on project dropwizard-api: Execution checkstyle of goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check
failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check
(checkstyle) on project dropwizard-api: Execution checkstyle of goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check
failed.
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	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:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	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.PluginExecutionException: Execution checkstyle of goal
org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check failed.
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 20 more
Caused by: java.lang.NullPointerException
	at java.util.zip.ZipFile.getZipEntry(ZipFile.java:566)
	at java.util.zip.ZipFile.access$900(ZipFile.java:60)
	at java.util.zip.ZipFile$ZipEntryIterator.next(ZipFile.java:524)
	at java.util.zip.ZipFile$ZipEntryIterator.nextElement(ZipFile.java:499)
	at java.util.zip.ZipFile$ZipEntryIterator.nextElement(ZipFile.java:480)
	at java.util.jar.JarFile$JarEntryIterator.next(JarFile.java:257)
	at java.util.jar.JarFile$JarEntryIterator.nextElement(JarFile.java:266)
	at java.util.jar.JarFile$JarEntryIterator.nextElement(JarFile.java:247)
	at org.codehaus.plexus.resource.loader.JarHolder.getEntries(JarHolder.java:132)
	at org.codehaus.plexus.resource.loader.JarResourceLoader.loadJar(JarResourceLoader.java:100)
	at org.codehaus.plexus.resource.loader.JarResourceLoader.initialize(JarResourceLoader.java:63)
	at org.codehaus.plexus.resource.loader.JarResourceLoader.getResource(JarResourceLoader.java:141)
	at org.apache.maven.plugin.checkstyle.resource.LicenseResourceManager.getResource(LicenseResourceManager.java:75)
	at org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:91)
	at org.apache.maven.plugin.checkstyle.exec.DefaultCheckstyleExecutor.getOverridingProperties(DefaultCheckstyleExecutor.java:564)
	at org.apache.maven.plugin.checkstyle.exec.DefaultCheckstyleExecutor.getConfiguration(DefaultCheckstyleExecutor.java:379)
	at org.apache.maven.plugin.checkstyle.exec.DefaultCheckstyleExecutor.executeCheckstyle(DefaultCheckstyleExecutor.java:217)
	at org.apache.maven.plugin.checkstyle.CheckstyleViolationCheckMojo.execute(CheckstyleViolationCheckMojo.java:538)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	... 21 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message