开发者

Modifying configs files in my.war/WEB-INF/ before deploying on Tomcat for integration tests

开发者 https://www.devze.com 2023-02-17 01:49 出处:网络
I have REST client/server application based on a Jetty Servlet That I deploy on Tomcat. The client and servers and two different modules.

I have REST client/server application based on a Jetty Servlet That I deploy on Tomcat. The client and servers and two different modules.

I have also created a third module (webapp-tests) that is only responsible for launching integration tests.

I would like to deploy several instances of the "war" created by the server module by using the "Cargo" plugin, before running the tests.

Indeed, I have a configuration file located in 'WEB-INF/' that contains some settings (like MySQL connection settings, timouts, etc ...). And I would like to alter this config file within the WAR file before deploying it with Cargo, with several flavours of configuration (several MySQL versions, ..., etc)

Do you have an idea of how I can manage this.

Thanks in advance for your help, Best regards,

Raph开发者_运维问答ael


In the integration test module you can use the dependency-plugin to get the dependency (war-file) and decompress the war file and replace the configuration file and run the integration test. It's only depending how often you call the integration tests...

0

精彩评论

暂无评论...
验证码 换一张
取 消