Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340913

Summary: Renaming projects does not update java-output-path property in org.eclipse.wst.common.component
Product: [WebTools] WTP Java EE Tools Reporter: Roberto Sanchez Herrera <shr31223>
Component: jst.j2eeAssignee: Roberto Sanchez Herrera <shr31223>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc
Version: 3.2.3Flags: cbridgha: review+
Target Milestone: 3.2.4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch none

Description Roberto Sanchez Herrera CLA 2011-03-24 17:03:05 EDT
Build Identifier: WTP 3.2.3

Renaming a project does not update the java-output-path property in org.eclipse.wst.common.component. The property keeps the old value. 

For example, create a Web 2.5 project named MyWeb1. Here is the contents of the file org.eclipse.wst.common.component:

<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="MyWeb1">
        <wb-resource deploy-path="/" source-path="/WebContent"/>
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
        <property name="context-root" value="MyWeb1"/>
        <property name="java-output-path" value="/MyWeb1/build/classes"/>
    </wb-module>
</project-modules>

Now rename the project (Right click -> Refactor -> Rename...) to MyWeb2. This is the file again:

<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="MyWeb2">
        <wb-resource deploy-path="/" source-path="/WebContent"/>
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
        <property name="java-output-path" value="/MyWeb1/build/classes"/>
        <property name="context-root" value="MyWeb2"/>
    </wb-module>
</project-modules>

Reproducible: Always
Comment 1 Roberto Sanchez Herrera CLA 2011-03-25 18:10:15 EDT
Created attachment 191945 [details]
Proposed patch

This patch replaces the old name with the new name of the project in java-output-path  property.
Comment 2 Chuck Bridgham CLA 2011-03-30 11:05:30 EDT
approved
Comment 3 Carl Anderson CLA 2011-03-30 21:21:03 EDT
Committed to R3_2_maintenance and HEAD for WTP 3.2.4 and WTP 3.3 M7