Eclipse uses ${workspace}/Servers/${server-name}/server.xml
for its configuration. That directory is created when you setup a new server. It's not overwritten every time you deploy the app but only if you make changes in the server config UI. If you need to add something manually to server.xml
then do so and set the file to read-only e.g. directly in Eclipse:
- locate the file (see path above)
- right-click
- Properties
- Resource
- enable "Read only"
That way Eclipse will ask/notify you everytime it tries to alter the file and you can allow/disallow that.