Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345737 - No redeployment/publish after changes in Utility-Modules
Summary: No redeployment/publish after changes in Utility-Modules
Status: NEW
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: jst.server (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Gorkem Ercan CLA
QA Contact: Elson Yuen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 09:48 EDT by Stefan Maurer CLA
Modified: 2011-08-12 04:21 EDT (History)
2 users (show)

See Also:


Attachments
Projects that were used to verify problem (12.09 KB, application/zip)
2011-05-13 09:50 EDT, Stefan Maurer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Maurer CLA 2011-05-13 09:48:09 EDT
Build Identifier: 20110218-0911

The redeployment of code-changes does not work correctly for web applications that have dependencies between several projects. 

The folder \.plugins\org.eclipse.wst.server.core\tmp0 only gets updated when the corresponding Java EE module has been changed. I would expect that eclipse recognizes the changes in the utility module without having changes in the "mother"-project.

Environment Eclipse Helios, JBoss 4


Reproducible: Always

Steps to Reproduce:
1.Create a J2EE Project (Must contain web project)
2.Create a Dynamic Web Project (Must contain utility project)
3.Create a Utility Project 
4.Create a test JSP with a Servlet in the web project
5.Create a class with a getTestString method in the utility project that returns a a string
6.Use getTestString in Servlet to show the returned String on JSP.
7.Start Server: check if correct String is shown on website
8.If yes, change returned String in getTestString 
9.Redeploy webapp
10.Check Website ==> String value did not change.
Comment 1 Stefan Maurer CLA 2011-05-13 09:50:45 EDT
Created attachment 195591 [details]
Projects that were used to verify problem
Comment 2 Angel Vera CLA 2011-05-19 13:46:34 EDT
Since you are using a jBoss adapter, I am sending you with the expert in that area. There are two plugins that provide jBoss Server connectivy. One that we ship with WTP and one that is downloadable, let us know which one you are using.
Comment 3 Stefan Maurer CLA 2011-05-20 01:58:40 EDT
We are using the JBoss-Adapter that is shipped with WTP.
Comment 4 Rob Stryker CLA 2011-08-12 04:19:08 EDT
In the Generic Server, the Utility Project is not in the heirarchy of modules. It's still (magically) getting published correctly, so their publisher must be using some other logic. But you can verify that it is not in the heirarchy of modules. 

If you open the Server's view after deploying, you see: 
   ServerName
   |-  EarModule
     |-  Web Module
        |- Utility Project   (MISSING)

The utility project is not in the list of the modules that are deployed, so a changed file or workspace delta is not registering that the module needs to be republished.  If the servertools had a "full publish" option or action, you would quickly see that the module does deploy properly again, so it's not a runtime issue. This is an issue with the Generic Server. 

The GenericServer has the following code:

	public IModule[] getChildModules(IModule[] module) {
		if (module[0] != null && module[0].getModuleType() != null) {
			if (module.length == 1) {
                etc etc etc...
        }

This means the Generic Server is not listening to the fact that the Utility Project is a child module of the Web Project. It's asking, what are the children of web project?  In this API, the call is getChildModule(  new IModule[]{ earProj, webProj});  So the length of module is 2. The code is returning an empty array, declaring Utility Project is not a child module, and so changes there do not register for an automatic republish.