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 75ACB200C4F for ; Sat, 1 Apr 2017 15:54:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 74128160B9D; Sat, 1 Apr 2017 13:54:48 +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 BAAA1160B8D for ; Sat, 1 Apr 2017 15:54:47 +0200 (CEST) Received: (qmail 61464 invoked by uid 500); 1 Apr 2017 13:54:46 -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 61453 invoked by uid 99); 1 Apr 2017 13:54:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Apr 2017 13:54:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 792D4C05A7 for ; Sat, 1 Apr 2017 13:54:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 9yBgcJBMjb2Q for ; Sat, 1 Apr 2017 13:54:45 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 7ED4F5FDAA for ; Sat, 1 Apr 2017 13:54:44 +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 7C068E0D19 for ; Sat, 1 Apr 2017 13:54:43 +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 229032401D for ; Sat, 1 Apr 2017 13:54:42 +0000 (UTC) Date: Sat, 1 Apr 2017 13:54:42 +0000 (UTC) From: "Karl Heinz Marbaise (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (MNG-6170) NPE in cases using Multithreaded -T X versions:set -DnewVersion=1.0-SNAPSHOT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 01 Apr 2017 13:54:48 -0000 [ https://issues.apache.org/jira/browse/MNG-6170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karl Heinz Marbaise updated MNG-6170: ------------------------------------- Fix Version/s: 3.5.0 > NPE in cases using Multithreaded -T X versions:set -DnewVersion=1.0-SNAPSHOT > ---------------------------------------------------------------------------- > > Key: MNG-6170 > URL: https://issues.apache.org/jira/browse/MNG-6170 > Project: Maven > Issue Type: Bug > Components: core > Affects Versions: 3.1.1, 3.2.5, 3.3.1, 3.3.9 > Reporter: Karl Heinz Marbaise > Assignee: Karl Heinz Marbaise > Fix For: 3.5.0-beta-1, 3.5.0 > > > Based on the [issue|https://github.com/mojohaus/versions-maven-plugin/issues/54] marked for the versions-maven-plugin investigation shows that the real cause of this problem is located in maven-core. > The short description of the problem is calling Maven via: {{mvn -T 20 versions:set -DnewVersion=1.0-SNAPSHOT}} you will get an NPE. > I identified the following point in code as culprit for the problem: > MultiThreadedBuilder.java > {code} > // for each finished project > for ( int i = 0; i < analyzer.getNumberOfBuilds(); i++ ) > { > try > { > ProjectSegment projectBuild = service.take().get(); > if ( reactorContext.getReactorBuildStatus().isHalted() ) > { > break; > } > final List newItemsThatCanBeBuilt = > analyzer.markAsFinished( projectBuild.getProject() ); > for ( MavenProject mavenProject : newItemsThatCanBeBuilt ) > { > ProjectSegment scheduledDependent = projectBuildList.get( mavenProject ); > logger.debug( "Scheduling: " + scheduledDependent ); > Callable cb = > createBuildCallable( rootSession, scheduledDependent, reactorContext, taskSegment, muxer ); > service.submit( cb ); > } > } > catch ( InterruptedException e ) > { > rootSession.getResult().addException( e ); > break; > } > catch ( ExecutionException e ) > { > // TODO MNG-5766 changes likely made this redundant > rootSession.getResult().addException( e ); > break; > } > } > {code} > And the problematic part is before the second debugging output line: > {code} > ProjectSegment scheduledDependent = projectBuildList.get( mavenProject ); > logger.debug( "Scheduling: " + scheduledDependent ); > Callable cb = > createBuildCallable( rootSession, scheduledDependent, reactorContext, taskSegment, muxer ); > service.submit( cb ); > {code} > Cause it happens that the {{scheduledDependent}} could be null which will cause the issue. > This -looks like- is a regression, cause in Maven 3.0.5 it works without any issue. > Update: > I have found other examples where the NPE occurs: > * {{mvn -T20 javadoc:aggregate}} > * {{mvn -T20 install:install-file ...}} > This can cause confusion if you are using {{mvn.config}} and put thing like {{-T X}} into it. -- This message was sent by Atlassian JIRA (v6.3.15#6346)