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 201466 - compile on save (without deploy on save) does not work in Maven EAR project
Summary: compile on save (without deploy on save) does not work in Maven EAR project
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Petr Hejl
URL: http://www.zeroturnaround.com/forum/t...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-31 03:59 UTC by David Konecny
Modified: 2011-11-29 16:55 UTC (History)
1 user (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 David Konecny 2011-08-31 03:59:41 UTC
> http://forums.netbeans.org/post-112585.html
> http://www.zeroturnaround.com/forum/topic.php?id=1448

This appears to be a regression. Create a Maven EAR project with Maven Web project and in Web project create for example servlet. Now switch on Compile on Save and Deploy on Safe and run Ear. Doing any change (in index.jsp or your servlet Java file) will result in proper recompilation, copying of changed files to target folders and reload of changed files. So far all good.

Now switch off Deploy on Save in your projects and run EAR again. Modification of java servlet nor index.jsp does not result in copying new files to target directories. This used to work in NB 7.0.
Comment 1 David Konecny 2011-08-31 04:06:52 UTC
PetrH, can you look into this please? I started but have not got anywhere far. Thx.
Comment 2 Petr Hejl 2011-09-02 15:52:57 UTC
I'm trying to reproduce the behavior in both environments - before it was broken and trunk. However there are many things I'm not sure about. Can you provide exact steps? Here are mine:

1) open ide with clean user dir
2) register GF 3.1
3) create EE6 maven EAR, with web project, without ejb project
4) enable CoS and DoS on EAR
5) ??enable CoS and DoS on web?
6) create servlet
7) now what? run ends up with a dependency error
8) ??invoke build with dependency?
9) run EAR
10) check servlet classfile in webproject/target
11) change servlet
12) check servlet classfile in webproject/target
13) disable DoS on EAR
14) ??disable DoS on web?
15) do 9) - 12)

Is this the test case? Can you check the ?? steps?
Comment 3 Petr Hejl 2011-09-20 15:31:25 UTC
I'm not able to reproduce with 7.0fcs. When I run EAR the change in servlet does not trigger DoS or CoS. Can you provide steps to reproduce the ok behavior (7.0) and the wrong one (7.0.1)?
Comment 4 David Konecny 2011-09-20 19:59:18 UTC
Sorry for not responding to your previous question. User experiencing the problem is not on CC list ( I filed the issue on his behalf) so he cannot comment as I thought. :-)

(In reply to comment #2)
> 1) open ide with clean user dir
> 2) register GF 3.1
> 3) create EE6 maven EAR, with web project, without ejb project
> 4) enable CoS and DoS on EAR
> 5) ??enable CoS and DoS on web?

yes

> 6) create servlet
> 7) now what? run ends up with a dependency error

yes, you have to do #8

> 8) ??invoke build with dependency?

there should be third Maven project created which only purpose is to build set of projects - I usually use that one to build everything

> 9) run EAR
> 10) check servlet classfile in webproject/target

there is multiple places where servlet class can be found (eg. gfdeploy dir); I'm not sure how they differ but I was checking all of them

> 11) change servlet
> 12) check servlet classfile in webproject/target

at this step everything usually works fine. I would test changing index.jsp as well as that file is handled differently from classes I think

> 13) disable DoS on EAR
> 14) ??disable DoS on web?

last time I checked all projects involved has to be changed - both EAR and WAR.

> 15) do 9) - 12)

yes. and doing step 12 does not work on latest build. It was definitely reproducible.
Comment 5 Petr Hejl 2011-09-21 14:26:06 UTC
Are you sure the DoS in Maven EAR used to work in release70_fcs? It does not really work for me. Changes are propagated in web project only.

Also when I execute EAR deployment is ends with "Initializing..." without opening browser. Is this expected?
Comment 6 David Konecny 2011-09-21 19:46:25 UTC
(In reply to comment #5)
> Are you sure the DoS in Maven EAR used to work in release70_fcs? It does not
> really work for me. Changes are propagated in web project only.

There were some issues which you and I were fixing to make it work (eg. issue 177230) but there were also split of DoS into Cos+DoS which I think happened later. I do remember testing it and it worked. And that's what the guy from JRebel forum (see URL in the issue) complained about as well - works in 7.0 but not in 7.0.1.

> Also when I execute EAR deployment is ends with "Initializing..." without
> opening browser. Is this expected?

No. Browser should just open. :-)
Comment 7 Petr Hejl 2011-09-23 11:42:18 UTC
Now I'm able to reproduce the issue.
Comment 8 Petr Hejl 2011-09-23 11:46:18 UTC
Perhaps regression was introduced by the fix for issue #194197.

Should be fixed in web-main f6c4d8b698f7. Please verify.
BTW it looks like original reporter was complaining about DoS being performed even when it was disabled however I don't see such behavior.
Comment 9 Quality Engineering 2011-09-24 14:04:27 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/f6c4d8b698f7
User: phejl@netbeans.org
Log: #201466 compile on save (without deploy on save) does not work in Maven EAR project