Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Outline

Build Status Codacy Badge License

Alpine Executable WAR

An executable WAR provides a way to create a standalone WAR, with all dependencies, capable of being deployed simply by calling java -jar myapp.war. Pre-configured servlet containers are not required. The project incorporates a modern embedded Jetty container capable of supporting the Servlet 4.0 specification. The project requires Java 8 and is completely independent of the main Alpine project. In fact, the Alpine Executable WAR project can be used for virtually all Java web applications.

Usage

Configure the Maven POM with the Alpine Embedded WAR dependency and configure the Maven WAR plugin.

<dependencies>
    <!-- Add a dependency on Alpine Embedded WAR -->
    <dependency>
        <groupId>us.springett</groupId>
        <artifactId>alpine-executable-war</artifactId>
        <version>1.3.0</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

<plugins>
    <!-- Configure the Maven WAR plugin to overlay Alpine Embedded WAR -->
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
            <warName>${project.build.finalName}</warName>
            <archive>
                <manifest>
                    <mainClass>alpine.embedded.EmbeddedJettyServer</mainClass>
                </manifest>
            </archive>
            <dependentWarExcludes>WEB-INF/lib/*log4j*.jar,WEB-INF/lib/*slf4j*.jar</dependentWarExcludes>
            <overlays>
                <overlay>
                    <groupId>us.springett</groupId>
                    <artifactId>alpine-executable-war</artifactId>
                    <type>jar</type>
                </overlay>
            </overlays>
        </configuration>
    </plugin>
</plugins>

Command-Line Arguments

The following command-line arguments can be passed to a compiled executable WAR when executing it:

Argument Default Description
-context / The application context to deploy to
-host 0.0.0.0 The IP address to bind to
-port 8080 The TCP port to listens on

Copyright & License

Alpine is Copyright (c) Steve Springett. All Rights Reserved.

Permission to modify and redistribute is granted under the terms of the Apache License 2.0

Alpine makes use of several other open source libraries. Please see the NOTICE.txt file for more information.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.