We have a maven-managed spring-boot application that we now need to deploy in tomcat using a WAR file. During development, we used maven to start an embedded tomcat with the command:
mvn -D"-classpath %classpath package.path.App" -D"exec.executable=java" process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
I can build a war file by running mvn war:war, but if I try to deploy the resulting war, an error is produced:
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext
...
Caused by: java.lang.IllegalStateException: No SpringApplication sources have been defined. Either override the configure method or add an @Configuration annotation
I tried adding a mainClass directive to the maven-war-plugin's configuration, but to no avail.
Aucun commentaire:
Enregistrer un commentaire