Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340913 - Renaming projects does not update java-output-path property in org.eclipse.wst.common.component
Summary: Renaming projects does not update java-output-path property in org.eclipse.ws...
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.4   Edit
Assignee: Roberto Sanchez Herrera CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-24 17:03 EDT by Roberto Sanchez Herrera CLA
Modified: 2011-03-30 21:21 EDT (History)
1 user (show)

See Also:
cbridgha: review+


Attachments
Proposed patch (3.51 KB, patch)
2011-03-25 18:10 EDT, Roberto Sanchez Herrera CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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