Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 220493 - "Copy Static Resources on Save" for maven web projects missing
"Copy Static Resources on Save" for maven web projects missing
Status: RESOLVED DUPLICATE of bug 218345
Product: javaee
Classification: Unclassified
Component: Maven
7.3
All Windows 7
: P3 (vote)
: 7.4
Assigned To: Martin Janicek
issues@javaee
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-20 20:14 UTC by lallafa
Modified: 2013-09-02 08:37 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lallafa 2012-10-20 20:14:07 UTC
Plain Java web projects have an "Copy Static Resources on Save" option in the "Compile" panel. This option is missing for maven web projects.

This seems to be the history:

While debugging Netbeans used to copy static files on save. With NB 7.1(?) the option "Compile on save" was introduced. But static files where still copied on save regardless of this option (even if disable). Some people considered this as a bug and so it was "fixed". But not for maven web projects: version 7.1.2 still copies static resources on save (with "Compile on save" disabled). But this also got "fixed" in version 7.2.

Not every one was happy with this "fix" (Bug 207149) so a new option was introduced with version 7.2: "Copy Static Resources on Save". But again, not for maven web projects.
Comment 1 Martin Janicek 2012-10-23 12:14:36 UTC
I agree that we should make Ant and Maven projects consistent as much as possible, but this sounds more like a new feature to me (it was never implemented for Maven web based projects) and we are way after the feature freeze.

I'm sorry, but we have to wave this into the next release.
Comment 2 lallafa 2012-10-24 14:09:44 UTC
But is it possible to switch back to the 7.1.2 behavior? That is: copy static resources on save regardless of the "Compile on save" setting.

"Compile on save" does not work for me and developing without "copy static resources on save" is a nightmare so i still use NB 7.1.2 :-(
Comment 3 Martin Janicek 2012-10-29 09:31:52 UTC
(In reply to comment #2)
> But is it possible to switch back to the 7.1.2 behavior? That is: copy static
> resources on save regardless of the "Compile on save" setting.
> 
> "Compile on save" does not work for me and developing without "copy static
> resources on save" is a nightmare so i still use NB 7.1.2 :-(

This sounds like a bug, but I'm not able to reproduce it. I've just tried to create new Maven Web project, disable CoS, run it on Glassfish server and when changing the index.jsp file, it is correctly deployed on save and the changes are shows after using F5 in the browser.
Does this work for you?
Comment 4 lallafa 2012-11-01 13:11:45 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > But is it possible to switch back to the 7.1.2 behavior? That is: copy static
> > resources on save regardless of the "Compile on save" setting.
> > 
> > "Compile on save" does not work for me and developing without "copy static
> > resources on save" is a nightmare so i still use NB 7.1.2 :-(
> 
> This sounds like a bug, but I'm not able to reproduce it. I've just tried to
> create new Maven Web project, disable CoS, run it on Glassfish server and when
> changing the index.jsp file, it is correctly deployed on save and the changes
> are shows after using F5 in the browser.
> Does this work for you?

Yes, this way it works for me too. But this will not work:

 - start NB 7.3b
 - create a new Maven Web project
 - disable "Compile on save"
 - close NB
 - start NB again
 - start debug webapp
 - change index.jsp
 - reload page
 - no changes :-(

But I also have a simple work around:

 - enable "Compile on save"
 - disable "Compile on save" again
 - save changes in index.jsp
 - index.jsp gets copied!
 - will work as long as NB is not restarted, yipi!

That's wired but I can live with it ...
Comment 5 Martin Janicek 2012-11-01 13:58:10 UTC
Thanks, I can see the same problem as you are describing. I'll file a new ticket for that to separate the bug and this enhancement..
Comment 6 Martin Janicek 2012-11-01 14:02:28 UTC
I have created new issue 221258 for that bug
Comment 7 Martin Janicek 2013-09-02 08:37:02 UTC

*** This bug has been marked as a duplicate of bug 218345 ***


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