Raz Zelinger
Raz Zelinger

Reputation: 696

Running tomcat 9 embedded on maven

i'm trying to run tomcat 9 embedded through maven.

I saw that there is no 'tomcat9-maven-plugin' yet and that i can run tomcat 9 using tomcat7-plugin but i don't seem to be able to do so.

Things I've tried:

I don't know what else to try, no matter what i do it always run on version 7.0.47:

INFO: Starting Servlet Engine: Apache Tomcat/7.0.47

Thanks

Upvotes: 8

Views: 7591

Answers (1)

holmis83
holmis83

Reputation: 16604

Tomcat Maven plugin seems discontinued, but you can use Cargo plugin instead to run embedded Tomcat 9.

Add plugin configuration in pom:

<plugin>
  <groupId>org.codehaus.cargo</groupId>
  <artifactId>cargo-maven2-plugin</artifactId>
  <version>1.7.6</version>
  <configuration>
    <container>
      <containerId>tomcat9x</containerId>
      <type>embedded</type>
    </container>
  </configuration>
</plugin>

Start it with:

mvn org.codehaus.cargo:cargo-maven2-plugin:run

Upvotes: 6

Related Questions