This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 257495 - Failed "build" stops chain of mutli-project Run
Summary: Failed "build" stops chain of mutli-project Run
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-09 18:09 UTC by mclaborn
Modified: 2016-06-22 01:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (895.57 KB, text/plain)
2016-01-09 18:09 UTC, mclaborn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mclaborn 2016-01-09 18:09:11 UTC
Product Version = NetBeans IDE 8.1 (Build 201510222201)
Operating System = Linux version 3.13.0-74-generic running on amd64
Java; VM; Vendor = 1.8.0_51
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.51-b03

Reproducibility: Happens every time

Probably related to 256633.

STEPS:
  * Select multiple projects in the Projects view, one of which will return a bad exit code when "Run"
  * Right click on the selected projects and choose "Run"

ACTUAL:
  None of the projects after the one that has a failed build (bad exit code from the program execution) will be run

EXPECTED:
  All projects should run, regardless of success/failure.  This was the beahvior in 8.0.
Comment 1 mclaborn 2016-01-09 18:09:18 UTC
Created attachment 158074 [details]
IDE log
Comment 2 Tomas Zezula 2016-06-21 07:16:42 UTC
Looking at the code in the projectAction it seems that the build stop after a failure is a required behaviour that is there at least from the start of 2012.
I will try the NB 8.0.
Comment 3 Tomas Zezula 2016-06-21 07:40:06 UTC
It's caused by the fix of issue:
https://netbeans.org/bugzilla/show_bug.cgi?id=253750
The code in the ProjectAction stopping the build (run) in case of failure is there for ages as I described. But the Ant project execution ended with build success even in case of JVM nonzero exit. This was changed in issue #253750. I've complained that it's incompatible change but I didn't expect this problem. I will probably change the default value of java.failonerror to false.
Comment 4 Tomas Zezula 2016-06-21 09:20:34 UTC
In fact the current behaviour of chained execution which is interrupted by the non zero return code is a correct one.
1st) The non zero exit status should be a build failure.
2nd) In case of chained project output A>B>C>D where A collects data which are for example mapped by B then reduced by C and displayed by D the failure of B should stop the execution of chained projects.

However I added an option to allow you to switch to the old model of chained execution.
You can enable it by setting the property:
java.failonerror=false
in the project's nbproject/project.properties file.

Fixed jet-main e8d774ce9f18
Comment 5 Quality Engineering 2016-06-22 01:49:58 UTC
Integrated into 'main-silver', will be available in build *201606220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e8d774ce9f18
User: Tomas Zezula <tzezula@netbeans.org>
Log: #257495:Failed "build" stops chain of mutli-project Run