Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358075 - Opening built resource file in output folder re-generates it (removing profile activated content)
Summary: Opening built resource file in output folder re-generates it (removing profil...
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 05:04 EDT by Anders Hammar CLA
Modified: 2021-04-19 13:23 EDT (History)
1 user (show)

See Also:


Attachments
Test project to reproduce (12.65 KB, application/octet-stream)
2011-09-19 05:06 EDT, Anders Hammar CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Hammar CLA 2011-09-19 05:04:17 EDT
Build Identifier: 20110615-0604

In a project where a resource file is filtered, the generated file from a build with active profiles seems to be replaced when I open it through the Project Explorer. The result is that filtered values use the default values instead of the ones defined by a profile used in the original build.

Reproducible: Always

Steps to Reproduce:
1. Import the attached project (lab-r3)
2. Build the project with the "production" profile
3. From the CLI, check the target/classes/log4j.properties file content. E.g., the rootCategory should have "ERROR" level.
4. In Eclipse, using the Project Explorer, open the same file. You'll see that the content has now changed and the rootCategory is "DEBUG".
Comment 1 Anders Hammar CLA 2011-09-19 05:06:24 EDT
Created attachment 203574 [details]
Test project to reproduce
Comment 2 Igor Fedorenko CLA 2011-09-19 11:27:30 EDT
This behaviour is expected. m2e keeps filtered resources up-to-date with resources in their source location and regenerates filtered resources whenever it detects the two got out of sync. In your case this happens when filtered resources is opened in the editor and auto-refreshed from local filesystem as a result. Enabled desire profiles in project properties to make m2e produce expected filtered resources.
Comment 3 Anders Hammar CLA 2011-09-19 14:30:18 EDT
Ok. Thanks for clarifying.
Comment 4 Denis Roy CLA 2021-04-19 13:23:47 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/