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 228396 - Web application without deploy on save still deploying
Summary: Web application without deploy on save still deploying
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 7.4
Hardware: PC All
: P1 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-09 00:20 UTC by janario
Modified: 2013-04-18 21:30 UTC (History)
5 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 janario 2013-04-09 00:20:06 UTC
Maven Web project is deploying with option deploy on save unchecked 

It shows progress "Deploying..." and , in my case, tomcat logs a redeploy:
Apr 08, 2013 9:06:49 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/Test] has started
Apr 08, 2013 9:06:50 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/Test] is completed

I'm using the main-silver branch. Maybe this is already right in main

Product Version = NetBeans IDE Dev (Build 20130408-953d02ba022a)
Operating System = Linux version 3.5.0-26-generic running on amd64
Java; VM; Vendor = 1.7.0_17
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Comment 1 janario 2013-04-11 12:11:54 UTC
As I saw:

It must use the key netbeans.deploy.on.save(MavenJavaEEConstants.HINT_DEPLOY_ON_SAVE) from nbconfiguration.

When it shows in the project gui it finds from 
DeployOnSaveCheckBoxUpdater.getValue 
DeployOnSaveCheckBoxUpdater.setValue: writes netbeans.deploy.on.save on the file

The server sees if it is deploying on save:
MavenProjectSupport.isDeployOnSave
MavenProjectSupport.setDeployOnSave 
I've tryied to force write in MavenProjectSupport and it generates the key org-netbeans-modules-maven-j2ee.netbeans_2e_deploy_2e_on_2e_save in my nbconfiguration

Putting org-netbeans-modules-maven-j2ee.netbeans_2e_deploy_2e_on_2e_save in my file I receive another exceptions.

The problem is that the MavenProjectSupport is generating/reading a different key
Comment 2 misterm 2013-04-11 12:22:36 UTC
Yes, this happens with me also in Windows 7 x64
Comment 3 Martin Janicek 2013-04-11 12:42:34 UTC
I'm on it..
Comment 4 Martin Janicek 2013-04-11 13:20:10 UTC
Changing TM back to 7.4. Based on the comment 1, the problem lies only in trunk. It's probably another consequence of my "genial" idea to rewrite most of the code to use ProjectUtils.getPreferences instead of deprecated AuxiliaryProperties.
Comment 5 Martin Janicek 2013-04-15 12:13:37 UTC
After some investigation I'm afraid that this doesn't work also in Ant based projects and even in NetBeans 7.3.. I have to spend more time on it

Just for the record, my comment 4 is unrelated in this case.
Comment 6 Martin Janicek 2013-04-15 13:33:49 UTC
Should be fixed in: web-main #7e3faea95bba (only for Maven projects)
Comment 7 David Konecny 2013-04-15 22:13:52 UTC
I assume this was just a Maven issue and there is nothing wrong with Ant based project types. Otherwise please pass the bug to me. Thanks.
Comment 8 Martin Janicek 2013-04-16 10:25:27 UTC
(In reply to comment #7)
> I assume this was just a Maven issue and there is nothing wrong with Ant based
> project types. Otherwise please pass the bug to me. Thanks.

Not really, I was able to reproduce the same behavior in Ant based projects. But your fix will be probably a little bit different. To be honest I'm not really sure if this ever worked which sounds pretty weird, but maybe I'm missing some context or maybe I'm testing something else or I don't know :)

Reopening and passing to Web Project component..
Comment 9 Petr Jiricka 2013-04-18 07:55:35 UTC
Ant web project has a separate setting in project properties called "Copy Static Resources on Save", which controls the behavior for JSPs etc (separately from Java classes). So it may be a good idea to also introduce such setting for Maven, to make it consistent. However, in Ant web project this setting in in the Compiling panel - does not is really belong to Run, David?
Comment 10 David Konecny 2013-04-18 21:30:47 UTC
I tried latest dev build but I cannot reproduce the problem. Please file a new issue with steps how to reproduce. Thanks. Re-closing as fixed Maven issue.

> However, in Ant web project this setting in in
> the Compiling panel - does not is really belong to Run, David?

Could do. I'm not sure. Both places make sense to me.