Eclipse modifies server.xml each time run the project (Run–>Run on Server)

eclipseeclipse-junosettingstomcat7

I'm using Tomcat 7 on Eclipse Juno. I use workspace metadata as server location (Please see my tomcat configurations below).

Tomcat configurations

Also I got a Server project in eclipse [please see the image below] with separate server.xml and other configuration files.

Server project

Normally it works fine. The issue came across after I changed the server.xml (in eclipse project) for SSL configurations.

Configurations are working fine. But each time I run the project (Run–>Run on Server) server.xml get modified to the default version. My customized SSL changes are missing.

Also I tried to change server.xml in tomcat installation location (C:\apache-tomcat-7.0.35\conf), but it didn't pick from eclipse.

Can anyone please help me on this?

Thanks

Best Answer

In {workspace}/Servers you will find a folder for every Tomcat configuration, containing several configuration files, including the server.xml. There you then can edit the file directly.

To get changes taken into account restart Eclipse. That is imho better than removing and adding the configuration back all the time. Tested using Eclipse Mars and Tomcat 7.

(the solution is from: Eclipse with tomcat - eclipse modifies server.xml)