MVN

com.github.yohayg : tomcat-deployment-listener

Maven & Gradle

Apr 03, 2018
0 stars

tomcat-deployment-listener · According to Docker best practices a Docker container should not be up if the process fails to load properly. Apache Tomcat deploys all the web applications loaded in its webapp folder. This is a resilient solution for web applications not influencing the application server. However, In a Docker environment according to best practice, the process should fail in case the web application failed to initialize properly. By adding the additional jar created by this project to Tomcat classpath and adding the new listener in the Tomcat conf/server.xml the user can make sure the Tomcat process fails in case there is an initialization exception in their web application which will cause the Tomcat used the tomcat container to abort in immediately indicate that there was an initialization error Abort tomcat when a webapp fails to deploy in Docker container Docker container best practice. Tomcat does not stop if a webapp fail to deploy and the container will continue to run. By adding this listener the tomcat will abort in case the Tomcat fails to deploy the webapp, And the container will not start. You will need to place the listener in Tomcat server.xml and set the Tomcat classpath to contain this jar

<dependency>
    <groupId>com.github.yohayg</groupId>
    <artifactId>tomcat-deployment-listener</artifactId>
    <version>2.0.0</version>
</dependency>
Copy
pom.xml
Table Of Contents

Latest Version

Choose a version of com.github.yohayg : tomcat-deployment-listener to add to Maven or Gradle - Latest Versions:

  • Latest Stable: 2.0.0

All Versions

Choose a version of com.github.yohayg : tomcat-deployment-listener to add to Maven or Gradle - All Versions:

Version Vulnerabilities Updated
2.0.x
tomcat-deployment-listener-2.0.0
1.0.x
tomcat-deployment-listener-1.0.0

How to add a dependency to Maven

Add the following com.github.yohayg : tomcat-deployment-listener maven dependency to the pom.xml file with your favorite IDE (IntelliJ / Eclipse / Netbeans):

<dependency>
    <groupId>com.github.yohayg</groupId>
    <artifactId>tomcat-deployment-listener</artifactId>
    <version>2.0.0</version>
</dependency>

How to add a dependency to Gradle

Gradle Groovy DSL: Add the following com.github.yohayg : tomcat-deployment-listener gradle dependency to your build.gradle file:

implementation 'com.github.yohayg:tomcat-deployment-listener:2.0.0'

Gradle Kotlin DSL: Add the following com.github.yohayg : tomcat-deployment-listener gradle kotlin dependency to your build.gradle.kts file:

implementation("com.github.yohayg:tomcat-deployment-listener:2.0.0")

How to add a dependency to SBT Scala

SBT Scala: Add the following com.github.yohayg : tomcat-deployment-listener sbt scala dependency to your build.sbt file:

libraryDependencies += "com.github.yohayg" % "tomcat-deployment-listener" % "2.0.0"