Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C1339200CB2 for ; Sun, 25 Jun 2017 13:50:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C03B3160BE0; Sun, 25 Jun 2017 11:50:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DFAFA160BD8 for ; Sun, 25 Jun 2017 13:50:05 +0200 (CEST) Received: (qmail 55683 invoked by uid 500); 25 Jun 2017 11:50:05 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 55672 invoked by uid 99); 25 Jun 2017 11:50:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Jun 2017 11:50:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 94FD6C0857 for ; Sun, 25 Jun 2017 11:50:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.211 X-Spam-Level: X-Spam-Status: No, score=-99.211 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id GBllU1x6Iwkd for ; Sun, 25 Jun 2017 11:50:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id B178B5FDA3 for ; Sun, 25 Jun 2017 11:50:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 76D47E0DD0 for ; Sun, 25 Jun 2017 11:50:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 419B7240C4 for ; Sun, 25 Jun 2017 11:50:00 +0000 (UTC) Date: Sun, 25 Jun 2017 11:50:00 +0000 (UTC) From: "Ed Randall (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (MCHECKSTYLE-287) checkstyle report throws NPE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 25 Jun 2017 11:50:06 -0000 [ https://issues.apache.org/jira/browse/MCHECKSTYLE-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16062292#comment-16062292 ] Ed Randall edited comment on MCHECKSTYLE-287 at 6/25/17 11:49 AM: ------------------------------------------------------------------ Am trying to follow the documentation for multimodule configuration, should be supported: https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html OK I got it - the csrules sub-module can be there but must explicitly *not* share the project parent pom, the reactor then builds correctly. The demo project then illustrates the issue on a clean cache, will re-upload.... was (Author: edrandall): Am trying to follow the documentation for multimodule configuration, should be supported: https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html > checkstyle report throws NPE > ---------------------------- > > Key: MCHECKSTYLE-287 > URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-287 > Project: Maven Checkstyle Plugin > Issue Type: Bug > Affects Versions: 2.13, 2.14 > Reporter: Thomas Scheffler > Attachments: patch1.diff, projects.tar.gz > > > I don't know what triggers this bug. Somehow org.apache.maven.plugin.checkstyle.AbstractCheckstyleReport.collectArtifacts(String) produces a List which contains the null object. And therefor an exception is thrown here (2.14): > {noformat} > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project oaipmh: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed. NullPointerException -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project oaipmh: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed. > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224) > 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:120) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:160) > 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.PluginExecutionException: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed. > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) > ... 19 more > Caused by: java.lang.NullPointerException > at org.apache.maven.plugin.checkstyle.exec.DefaultCheckstyleExecutor.configureResourceLocator(DefaultCheckstyleExecutor.java:852) > at org.apache.maven.plugin.checkstyle.exec.DefaultCheckstyleExecutor.executeCheckstyle(DefaultCheckstyleExecutor.java:102) > at org.apache.maven.plugin.checkstyle.AbstractCheckstyleReport.executeReport(AbstractCheckstyleReport.java:474) > at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:156) > at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:255) > at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:219) > at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319) > at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135) > at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175) > at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) > ... 20 more > {noformat} > Looking at the code, you see a null check is done for the list, bit not for elements of that list: > {noformat} > // MCHECKSTYLE-225: load licenses from additional artifacts, not from classpath > if ( additionalArtifacts != null ) > { > for ( Artifact licenseArtifact : additionalArtifacts ) > { > try > { > resourceManager.addSearchPath( "jar", "jar:" + licenseArtifact.getFile().toURI().toURL() ); > } > catch ( MalformedURLException e ) > { > // noop > } > } > } > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)