2

We have a Spring web app (JDK 1.8) and (for development purposes) we're running it on embedded tomcat container, i.e. - we're using tomcat7-maven-plugin. The app is being started with

mvn tomcat7:run ...

For what I found out on I-net, there is no tomcat8-maven-plugin yet.

I found a few posts that claim that this also works with Tomcat 8, but it's not clear how to configure maven plugin to run Tomcat version 8, instead of version 7.

I tried this: https://tomcat.apache.org/maven-plugin-2.2/tomcat7-maven-plugin/adjust-embedded-tomcat-version.html

and the build was successful, but the run failed with:

[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2: run (default-cli) on project spotbuy: Execution default-cli of goal org.apache.t omcat.maven:tomcat7-maven-plugin:2.2:run failed: An API incompatibility was encountered while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run: java.lang.NoSuchMethodError: org.apache.catalina.startup.Tomcat.setDefaultRealm(Lorg/apache/catalina/Realm;)

I researched again and I found out, this is known unresolved problem.

Provided it's even possible, can anybody, please, give more details what and where should be configured?

Jimo
  • 143
  • 2
  • 14
  • do you need this for test purposes? – Hisham Khalil May 20 '16 at 08:02
  • development/test purposes – Jimo May 20 '16 at 10:50
  • development/test purposes. I know we can have Tomcat installed separately and just deploy the app on it, but we'd like to use an embedded Tomcat. With Spring Boot, the default embedded Tomcat is v.8, but unfortunately this app is older and it's implemented with Spring only (not Spring Boot) ... – Jimo May 20 '16 at 12:23

1 Answers1

-1

It's not possible ... for now ...

Jimo
  • 143
  • 2
  • 14