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 - nbactions.xml only honors changes once
Summary: nbactions.xml only honors changes once
Status: RESOLVED INVALID
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0.1
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 204907
Blocks:
  Show dependency tree
 
Reported: 2011-10-09 07:31 UTC by xeno8
Modified: 2011-11-16 14:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.