Bug 204907 - Clarify when CoS is being used
Clarify when CoS is being used
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Maven
7.1
All All
: P3 (vote)
: 7.2
Assigned To: Jesse Glick
issues@projects
: PLAN, UI
Depends on: 189103 209814
Blocks: 175689 196008 202345 202839 203385
  Show dependency treegraph
 
Reported: 2011-11-09 22:45 UTC by Jesse Glick
Modified: 2012-03-24 11:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-11-09 22:45:36 UTC
Compile on Save mode is on by default for unit tests in Maven projects. Usually this is fine and speeds up the edit-test cycle, but for specialized configurations of Surefire or other plugins it can produce incorrect results. While CoS can be turned off, users do not necessarily realize it was on to begin with. Options (not necessarily exclusive):

1. Show a notification dialog (or status line icon?) when CoS for tests is first used explaining what is going on and how to turn it off.

2. Turn off CoS by default but show a notification dialog when a project would be eligible to use it, offering to enable it.

3. Try harder to determine when CoS would produce different results from Surefire and automatically disable it in those cases.

4. Conversely, interpret more Surefire parameters and pass them to JavaRunner.

5. Provide a global setting for the default CoS mode as well as the current per-project configuration.
Comment 1 Milos Kleint 2012-02-08 13:46:24 UTC
as I learned last year at netbeans day  from Adam Bien, even the capacity to enable CoS for web apps (non test) execution is not common knowledge and I was asked why it's not on by default.
Comment 2 Jesse Glick 2012-03-21 00:35:21 UTC
Deploy on Save (DoS) is in fact on by default - but is only active when CoS is also on for running (app, all), which is not the default. The EE wizard iterator turns it on for newly created projects, creating nb-configuration.xml as an annoying side effect, but this is useless for existing projects.

Since you do not normally have run targets in a Maven SE project, and certainly nothing like the IDE's deploy to configured server for an EE project (just jetty:run and the like), making CoS be enabled for running by default only makes sense.

The question is then whether the default mode should be app or all, i.e. whether CoS should remain on by default for tests. Given the large set of bugs filed about test CoS, usually involving specialized Surefire configuration, and the fact that people are particularly frustrated when tests are not reliable, I am inclined to think it should be off, but with a suggestion to turn on.
Comment 3 Jesse Glick 2012-03-21 01:06:54 UTC
core-main #65a323e497fe
Comment 4 Quality Engineering 2012-03-24 11:01:16 UTC
Integrated into 'main-golden', will be available in build *201203240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/65a323e497fe
User: Jesse Glick <jglick@netbeans.org>
Log: #204907: make app, but not test, the default value for CoS.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo