user937347
user937347

Reputation: 41

Eclipse m2e-wtp plugin constantly overwriting application.xml

I've inherited a project where we already have an application.xml file for my maven-ear-plugin project. We have to use that. But when I import this bloody project into eclipse, it is constantly overwriting this file - I have to go to local history and recover it.

Every time anyone does a clean build, changes project settings, etc., the file is overwritten by something in eclipse (I am assuming the m2e plugin). How do I tell it to leave the frigging file alone. I'm not supposed to touch it, so neither is it.

The setting to generate the file in the build directory is irrelevant - I do not want it to generate anything.

Upvotes: 4

Views: 1796

Answers (2)

Fred Bricon
Fred Bricon

Reputation: 5579

Simply add <generateApplicationXml>false</generateApplicationXml> to your maven-ear-plugin configuration

Upvotes: 1

Alexander Pogrebnyak
Alexander Pogrebnyak

Reputation: 45576

It's a bug in m2e-wtp.

I've submitted a similar report for constant modification of org.eclipse.wst.common.component file -> https://issues.sonatype.org/browse/MECLIPSEWTP-146

They claim it's fixed for the next release. Maybe it also fixes your problem.

If it does not, submit a new bug to Sonatype, as you can see they are very responsive.

In the meantime, if you know that you are not changing application.xml, then just delete it and recover it from your source control. That is what I ended up doing with 'component' file.

Guess, that's the price of being on a cutting edge.

Upvotes: 0

Related Questions