org.avaje.jetty:runnable-war

Provides a parent pom that builds runnable war using jetty. This uses the "maven overlay approach" to put jetty, logging, servlet api and avaje-jetty-runner into the root path of the war and a manifest entry to point to the RunWar main method. The jars included in the overlays provide a set of system classes that boot and run the war.

License

License

Categories

Categories

Jetty Container Application Servers
GroupId

GroupId

org.avaje.jetty
ArtifactId

ArtifactId

runnable-war
Last Version

Last Version

2.2.1
Release Date

Release Date

Type

Type

tree
Description

Description

Provides a parent pom that builds runnable war using jetty. This uses the "maven overlay approach" to put jetty, logging, servlet api and avaje-jetty-runner into the root path of the war and a manifest entry to point to the RunWar main method. The jars included in the overlays provide a set of system classes that boot and run the war.
Project URL

Project URL

http://www.avaje.org/runnable-war
Source Code Management

Source Code Management

https://github.com/avaje-common/avaje-runnable-war.git

Download runnable-war

Dependencies

compile (29)

Group / Artifact Type Version
org.avaje.jetty : avaje-jetty-runner jar 2.2.1
javax.servlet : javax.servlet-api jar 3.1.0
org.slf4j : slf4j-api jar 1.7.12
org.slf4j : jcl-over-slf4j jar 1.7.12
ch.qos.logback : logback-classic jar 1.1.3
ch.qos.logback : logback-core jar 1.1.3
org.eclipse.jetty : jetty-webapp jar 9.3.8.v20160314
org.eclipse.jetty : jetty-xml jar 9.3.8.v20160314
org.eclipse.jetty : jetty-servlet jar 9.3.8.v20160314
org.eclipse.jetty : jetty-server jar 9.3.8.v20160314
org.eclipse.jetty : jetty-security jar 9.3.8.v20160314
org.eclipse.jetty : jetty-http jar 9.3.8.v20160314
org.eclipse.jetty : jetty-io jar 9.3.8.v20160314
org.eclipse.jetty : jetty-util jar 9.3.8.v20160314
org.eclipse.jetty.websocket : javax-websocket-server-impl jar 9.3.8.v20160314
org.eclipse.jetty : jetty-annotations jar 9.3.8.v20160314
org.eclipse.jetty : jetty-plus jar 9.3.8.v20160314
org.eclipse.jetty : jetty-jndi jar 9.3.8.v20160314
javax.websocket : javax.websocket-api jar 1.0
javax.annotation : javax.annotation-api jar 1.2
org.ow2.asm : asm jar 5.0.1
org.ow2.asm : asm-commons jar 5.0.1
org.ow2.asm : asm-tree jar 5.0.1
org.eclipse.jetty.websocket : websocket-server jar 9.3.8.v20160314
org.eclipse.jetty.websocket : websocket-common jar 9.3.8.v20160314
org.eclipse.jetty.websocket : websocket-api jar 9.3.8.v20160314
org.eclipse.jetty.websocket : websocket-servlet jar 9.3.8.v20160314
org.eclipse.jetty.websocket : javax-websocket-client-impl jar 9.3.8.v20160314
org.eclipse.jetty.websocket : websocket-client jar 9.3.8.v20160314

Project Modules

There are no modules declared in this project.

avaje-runnable-war

Provides a maven parent pom that uses maven overlay, jetty and avaje-jetty-runner to build runnable wars

This uses the "maven overlay approach" to put jetty, logging, servlet api and avaje-jetty-runner into the root path of the war and a manifest entry to point to the RunWar main method. The jars included in the overlays provide a set of system classes that boot and run the war.

  • runnable-war : Maven Central : runnable-war
  1. Maven parent pom

In a maven project specify runnable-war as the parent pom.

  <parent>
    <groupId>org.avaje.jetty</groupId>
    <artifactId>runnable-war</artifactId>
    <version>2.1.2</version>
  </parent>
  1. mvn clean package

This builds the war and will insert the jetty + logging + avaje-jetty-runner classes into the root of the war. It puts in a manifest entry to the avaje-jetty-runner RunWar.main() method.

Assumes logback is used for logging.

Version 2.1.1 introduces support for Websockets by adding the appropriate additional jetty dependencies.

  1. Run the war

Create a local logback.xml file and typically also a properties file.

#!/bin/sh
java -Dlogback.configurationFile=logback.xml -jar target/example-1.1.1-SNAPSHOT.war

References:

http://jowisoftware.de/blog/archives/26-Creating-runnable-wars-with-Maven-and-Jetty.html

https://github.com/uoa-group-applications/common-runnable-war

Debian Package:

The example https://github.com/avaje-common/example-runnable-war ... additionally uses jdeb to package the application up as a .deb with a logback.xml, properties file and init.d script.

org.avaje.jetty

avaje

Versions

Version
2.2.1
2.1.2
2.1.1
1.2.3
1.2.2
1.2
1.1
1.0