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 187514 - Unnecessary Deployment when opening File in Editor
Summary: Unnecessary Deployment when opening File in Editor
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-12 21:07 UTC by bht
Modified: 2011-02-16 11:34 UTC (History)
3 users (show)

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 bht 2010-06-12 21:07:14 UTC
The project is re-deployed unnecessarily when an additional file is opened in the editor while another file has unsaved changes. How to reproduce:

File|New Project|Java Web|Web Application|Next
Next
Server: GlassFish V3
Java EE Version: Java EE 6 Web
Next|Finish

Project window|Right click on Source Packages|New|Java Package|test|Finish

Project window|Right click on Source Packages|test|New|Java Class|Test|Finish
Project window|Right click on Source Packages|test|New|HTML|Test|Finish

Close all files in editor.
Project window|Right click on project|Debug

Page loads in browser

Project window|Double click on Source Packages|test|Test.html
Make a change to the HTML file, do not save it.

Project window|Double click on Source Packages|test|Test.java

The java file file opens as expected

Additional expected behavior: Nothing

Additional actual behavior: The application is re-deployed.
Comment 1 David Konecny 2010-06-13 19:30:58 UTC
Thanks for the clear steps how to reproduce. I have not tried it myself but I agree that deployment should not be necessary at that time. Unless there is a reason for it. Passing to Petr H for evaluation.
Comment 2 bht 2010-06-27 02:49:17 UTC
The error occurs also if Test.java is already open in the editor and I switch to it eg using [Ctrl+Tab]
Comment 3 bht 2010-07-04 05:31:40 UTC
Another case:

Open Test.html

Open and modify Test.java but do not save

Press [Ctrl+Z] (undo) until all changes are reversed.

Close Test.java

The project is deployed.

Some cases might not reproduce with GlassFish 3.01.

But they reproduce with GlassFish 3.01 if the project is under Subversion control.

Could it be that deploy on save needs a better definition, what "save" means?
Possibly with user defined file types, and directories?
Comment 4 Petr Hejl 2010-09-15 15:12:09 UTC
Compilation related, I guess.
Comment 5 Petr Jiricka 2011-01-17 14:48:08 UTC
I can still reproduce the original test case in the latest continuous build of NB 7. Honzo, could you please investigate? Thanks.
Comment 6 Jan Lahoda 2011-02-11 08:21:07 UTC
Seems that this relates only to resources (I originally though it is general, but it appears that #152222 was about the Java part - the consequences may still be surprising, as some changes may not be pushed to the server, while other that depend on them may be):
http://hg.netbeans.org/jet-main/rev/90897880fe1e
Comment 7 Quality Engineering 2011-02-16 11:34:05 UTC
Integrated into 'main-golden', will be available in build *201102160501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/90897880fe1e
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #187514: not re-deploying application when a resource is changed, similarly to #152222 for Java.