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.
Not a new bug, just did not get to reporting it until now. CoS execution of tests (the default option) does not work reliably; there is something wrong with the detection of the timestamps. 1. If I change, say, a constructor signature in src/main/java, and change my usage of it in src/test/java accordingly, and run the test, it fails with a NoSuchMethodError. I have to build the project first. 2. Run Focused Test at this point calls mvn, i.e. does not use JavaRunner. It runs surefire-test with -Dnb.single.run.methodName=... -Dtest=..., which does not work properly - surefire ignore the NB property (unsurprisingly) and runs all the tests. 3. R.F.T. a second time now runs just the one requested test, with JavaRunner, and loads the modified main source class as expected. These things are not problems for j2seproject's that I know of.
*** Bug 188673 has been marked as a duplicate of this bug. ***
Possibly related to bug #182751.
*** Bug 187120 has been marked as a duplicate of this bug. ***
*** Bug 182751 has been marked as a duplicate of this bug. ***
re 1. I suppose the root of the problem is that the combo in project properties dialog not only denotes what gets executed by JavaRunner (by the IDE) but also what source roots get CoS-ed. If just Test is selected only the test source root is CoS enabled. That's most likely wrong, but AFAIK was chosen to be careful about dropping IDE's own class files to the project main artifact. re 2. AFAIK fixed in 7.2 timeframe for with introduction of surefire plugin 2.12.x.
(In reply to comment #5) > re 2. AFAIK fixed in 7.2 timeframe Right, this part is obsolete. Not sure about the rest.
http://hg.netbeans.org/core-main/rev/101634892108 when only tests are CoS enabled, we now before running check that some of the sources in main source roots have changed and if so, we skip JavaRunner and execute proper maven build, which ultimately runs the compilation
Integrated into 'main-golden', will be available in build *201211040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/101634892108 User: Milos Kleint <mkleint@netbeans.org> Log: #189103 when main source files get changed and we have CoS for tests only, we need to run maven build, not CoS