Bug 270738 - Copying and pasting a dynamic web project does not update the web module name on the target project
Summary: Copying and pasting a dynamic web project does not update the web module name...
Status: NEW
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.0.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: Future   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: greatfix_candidate
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2009-04-01 06:31 EDT by Mauro Molinari CLA
Modified: 2015-03-18 09:57 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mauro Molinari CLA 2009-04-01 06:31:30 EDT
Build ID: M20090211-1700

Steps To Reproduce:
1. create a Dynamic Web Project and call it "Project1"
2. copy and paste this project, in order to create another one which is a clone of the first; in the "Paste" dialog, specifiy "Project2" as the name of the target project (instead of "Copy of Project1")

OBSERVED BEHAVIOUR:
The context root of the target project is the same as the source project. This could be a problem, but it can be easily updated in the project settings and/or in the server editor (module tab).
However, even the module name is the same, while it's usually equal to the project name. So, in Project2/.settings/org.eclipse.wst.common.component I find the following:

<wb-module deploy-name="Project1">

This causes problems when deploying modules to the server. Moreover, the module name can't be easily changed through the GUI from anywhere.

EXPECTED BEHAVIOUR:
The copy&paste operation should update the web module name to "Project2", just like it happens when you rename a project.

More information:
WORKAROUND:
Make sure the module corresponding to the target project has not been added to the server. Then, manually edit Project2/.settings/org.eclipse.wst.common.component and change the deploy-name attribute value of the wb-module element. Close and restart Eclipse (!!!) and the new name will be taken. If you don't restart Eclipse, even if you edit org.eclipse.wst.common.component from within Eclipse, WTP does not take the change (it seems it's caching it somewhere in memory...).

Please note that I'm experiencing this problem with WTP 3.0.4. However, I had to specify 3.0.3 in this bug report because I can't find version 3.0.4 in the "Version" field.
Comment 1 Rob Stryker CLA 2009-10-27 16:06:59 EDT
I believe closing and re-opening the changed project should fix it as well. No need (I believe) to restart all of eclipse.
Comment 2 Robert Olofsson CLA 2013-12-10 03:20:32 EST
I'm seeing this same issue in Kepler Service Release 1, build id: 20130919-0819

The <wb-module deploy-name="project-name-goes-here"> line in the file org.eclipse.wst.common.component is not updated when a project is renamed.
Comment 3 Robert Olofsson CLA 2015-03-18 08:33:53 EDT
This bug is still alive and thriving in Luna Service Release 1a (4.4.1) Build id: 20150109-0600