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 203385

Summary: nbactions.xml only honors changes once
Product: projects Reporter: xeno8 <xeno8>
Component: MavenAssignee: Jesse Glick <jglick>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P3    
Version: 7.0.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 204907    
Bug Blocks:    

Description xeno8 2011-10-09 07:31:50 UTC
Steps to reproduce:

1. Create a new Maven Java application.
2. A file called "AppTest.java" should've been created in Test Packages. Test it (Ctrl+F6). The Test Results should indicate that the testApp() method was run and it passed successfully.
3. Go to Project Properties->Actions->Test file. There should be one property set: "test=${packageClassName}". Change it to "test=MatchNothing". Click "OK". Under Project Files, nbactions.xml should've been modified to reflect the change we just made.
4. Test AppTest.java again (Ctrl+F6). Notice that no tests get executed, which is what we'd expect, given that the Surefire plugin is now only looking for tests in a non-existent file named "MatchNothing".
5. Test AppTest.java one last time. (Ctrl+F6). Wait, what? Suddently AppTest.testApp() is picked up again even though we haven't made any changes to nbactions.xml since the last test run. What gives?

For the record, I was actually trying to change the property to "test=**/${className}*" so that Surefire would pick up nested test fixtures. As with the above scenario, the change works once before reverting to the default behavior.


Product Version = NetBeans IDE 7.0.1 (Build 201107282000)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 21.0-b17
Comment 1 Jesse Glick 2011-10-28 20:05:04 UTC
Disable Compile on Save for tests if you always want to use Surefire even when IDE-compiled classes are available.