Quantcast
Channel: Active questions tagged servlets - Stack Overflow
Viewing all articles
Browse latest Browse all 717

not able to docker:exec and start my tomcat in same command

$
0
0

I've been trying to start my Tomcat server and run a mvn exec command as a CMD statement in my Dockerfile, but I'm running into the following error, and not able to figure it out:

Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.LauncherCaused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher

Here's my dockerfile:

FROM maven:3.8.5-openjdk-11-slim AS builderWORKDIR /appCOPY . .RUN mvn clean packageRUN mvn --version # Runs fineFROM tomcat:10-jdk11WORKDIR /appCOPY --from=builder /app/target/project.war /usr/local/tomcat/webapps/project.warEXPOSE 8080CMD mvn exec:java -Dexec.cleanupDaemonThreads=false -Dexec.mainClass="MyClass" && catalina.sh run

I've tried many things but still not able to figure it out.


Viewing all articles
Browse latest Browse all 717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>