Bug 184922 - web files not updated during deploy on save.
web files not updated during deploy on save.
Status: RESOLVED DUPLICATE of bug 177230
Product: javaee
Classification: Unclassified
Component: Maven
6.x
All All
: P1 (vote)
: 6.x
Assigned To: Petr Hejl
issues@javaee
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-25 09:39 UTC by jockeeriksson
Modified: 2011-11-16 16:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jockeeriksson 2010-04-25 09:39:41 UTC
Create a simple ejb maven project. 
Set javaEE version to five.
create an empty sessionbean.
Set server to run to glassfish v2.1
build parent project.
run ejb project 
make changes to the hello world jsp.
refresh browser 

expected result 

The browser should reflect the changes 

actual  result 
nothing happens.


Product Version = NetBeans IDE 6.9 Beta (Build 201004200117)
Operating System = Linux version 2.6.31-20-generic running on amd64
Java; VM; Vendor = 1.6.0_15
Runtime = Java HotSpot(TM) 64-Bit Server VM 14.1-b02
Comment 1 Petr Jiricka 2010-04-26 10:16:05 UTC
Hi, is the Compile on Save setting in the Compile section of the project properties turned on (i.e. set to "For both application and test execution")?  Thanks.
Comment 2 jockeeriksson 2010-04-26 17:33:34 UTC
They are turned on. for all projects.
Comment 3 jockeeriksson 2010-04-26 18:01:12 UTC
when saving this is printed in IDE log


INFO [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Cannot incrementally deploy to more than one target
Comment 4 jockeeriksson 2010-04-26 18:05:07 UTC
When saving this is printed in IDE log

INFO [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Cannot incrementally deploy to more than one target
Comment 5 jockeeriksson 2010-04-26 18:06:53 UTC
When saving this is printed in IDE log.

INFO [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Cannot incrementally deploy to more than one target
Comment 6 jockeeriksson 2010-04-26 19:02:54 UTC
some more logging Finest 

FINEST [org.netbeans.modules.j2ee.deployment.impl.ServerRegistry]: Entering registry initialization
FINEST [org.netbeans.modules.j2ee.deployment.impl.ServerRegistry]: Entering registry initialization
FINE [org.netbeans.modules.j2ee.deployment.impl.DeployOnSaveManager]: Delivered copy artifact: /home/joe/NetBeansProjects/mavenproject1/mavenproject1-web/target/mavenproject1-web/index.jsp, null, isReferencedLibrary: false, isRelocatable: false, isServerResource: false
FINE [org.netbeans.modules.j2ee.deployment.impl.DeployOnSaveManager]: Performing pending deployments
FINEST [org.netbeans.modules.j2ee.deployment.impl.DeployOnSaveManager]: Artifacts updated: [/home/joe/NetBeansProjects/mavenproject1/mavenproject1-web/target/mavenproject1-web/index.jsp]
FINEST [org.netbeans.modules.j2ee.deployment.impl.ServerRegistry]: Entering registry initialization
FINEST [org.netbeans.modules.j2ee.deployment.impl.ServerRegistry]: Entering registry initialization
FINE [org.netbeans.modules.j2ee.deployment.impl.ServerInstance]: DebuggerInfo cannot be found for: GlassFish v2.x
INFO [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Cannot incrementally deploy to more than one target
FINE [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: []
FINE [org.netbeans.modules.j2ee.deployment.impl.DeployOnSaveManager]: Deployment state MODULE_NOT_DEPLOYED
FINEST [org.netbeans.modules.j2ee.deployment.impl.ServerRegistry]: Entering registry initialization
Comment 7 Petr Jiricka 2010-04-26 19:43:29 UTC
Ok, assigning to Petr H as the deployment infrastructure owner. A few more questions:
- If you deploy explicitly using the Deploy action, does it work? Does the application get updated?
- Does automatic redeployment work for GlassFish v3? 

Thanks.
Comment 8 jockeeriksson 2010-04-27 06:44:10 UTC
1 Can't find Deploy action in maven project.
2 Yes same problem

More: also has issues on my work computer that uses NetBeans 6.8.

Then i get this in the logs.

org.openide.filesystems.FileAlreadyLockedException: /home/jocke/NetBeansProjects/mavenproject1/mavenproject1-web/target/mavenproject1-web/index.jsp
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.registerLock(LockForFile.java:111)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.tryLock(LockForFile.java:100)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(FileObj.java:308)
        at org.netbeans.modules.maven.j2ee.web.CopyOnSave.copySrcToDest(CopyOnSave.java:100)
        at org.netbeans.modules.maven.j2ee.web.CopyOnSave.handleCopyFileToDestDir(CopyOnSave.java:329)
        at org.netbeans.modules.maven.j2ee.web.CopyOnSave.fileChanged(CopyOnSave.java:188)
[catch] at org.netbeans.modules.maven.j2ee.web.CopyOnSave$1.run(CopyOnSave.java:181)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)
Comment 9 Petr Jiricka 2010-04-27 07:55:10 UTC
> 1 Can't find Deploy action in maven project.

Sorry, I meant Run action.
Comment 10 Petr Hejl 2010-04-27 11:45:24 UTC
Please describe your steps precisely. You start with creation of ejb, yet couple of lines below you talk about parent project.

In your steps you run ejb project, so it is just logical that index.jsp is not redeployed.

Please provide the steps to reproduce in format like in this sample:
1) create EAR project
2) enable CoS in project and all children
3) create empty session bean in ejb

... etc.
Comment 11 jockeeriksson 2010-04-27 18:57:19 UTC
1) create maven EAR project with JEE 5 as option
2) enable CoS in project and all children
3) create empty session bean in ejb
4) build maven parent project and all children
5) Set glassfish v2.1 as server in project/properties/run on EAR project 
6) Run EAR using run in context menu
7) browser shows Hello world index page
8) add one more hello world tag on index page and save
9) Refresh browser
10) browser still shows one hello world should be two. 


The index.jsp should have bean copied to  directory in ${name_of_ear_project}/target/gfdeploy/${name_of_war_project}/

So changes can be seen, this is how it works in ant based projects anyway.
Comment 12 jockeeriksson 2010-04-27 19:37:43 UTC
This is a guy also having the same problem, this could be OS specific (Ubuntu)

http://stackoverflow.com/questions/2290935/hot-deploying-changes-with-netbeans-maven-and-glassfish
Comment 13 Petr Jiricka 2010-04-27 19:52:41 UTC
So could this be a duplicate of enhancement 177230? Looks like this was never supported, but certainly there is a lot of interest in this feature.
Comment 14 jockeeriksson 2010-04-28 06:04:23 UTC
Yes it's a duplicate! sorry i really thought this was supported already. I am stuck with rsync for now, but i will sure vote on that issue.
Comment 15 Petr Jiricka 2010-04-28 08:31:34 UTC
Ok, marking as a duplicate of bug 177230. Perhaps the "web files" aspect (i.e. auto-deploying web resources) could be simpler to implement; auto-redeploying changed Java files will probably be harder.

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


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