0

I know that a spring boot application comes with embedded tomcat and in order to execute the integration tests to run on tomcat we can do one of the following before running the tests:

  1. run springboot app which will start embedded tomcat
  2. use mvn package, java -jar target/.jar to run the jar

However, I want to be able to run embedded tomcat through a maven plugin and execute the tests such that everything is executed by command:

mvn clean install

I know using cargo plugin is one of the way to deploy war to standalone tomcat. But is there a way to deploy war in embedded tomcat automatically?

  • 3
    Did you **read the documentation**, i.e. section "[Working with integration tests](https://docs.spring.io/spring-boot/docs/current/maven-plugin/usage.html#Working_with_integration_tests)" on the "[Spring Boot Maven Plugin](https://docs.spring.io/spring-boot/docs/current/maven-plugin/usage.html)" page? – Andreas Sep 20 '19 at 21:11
  • Possible duplicate of [Spring Boot War deployed to Tomcat](https://stackoverflow.com/questions/27904594/spring-boot-war-deployed-to-tomcat) – padmanabhanm Sep 21 '19 at 15:35

0 Answers0