<commit_before>Jetty Daemon Runner
===================

Ever wanted a servlet engine in a single runnabable JAR that could 
correctly daemonize and run WAR from a command line? 

Jetty  Daemon Runner improves over existing jetty-runner with JVM daemonization.
It's packaged as a single runnable jar you can use on Unix platforms
supported by Akuma/JNA.

Usage
-----

* Start Jetty at port 8080 serving WAR at / as a daemon in background

```sh
	java -jar jetty-daemon.jar --start --pid some.pid some.war 
```

* Stop Jetty using pid file

```sh
	java -jar jetty-daemon.jar --stop --pid some.pid 
```

Features
--------
* Supports Java 8 on Unix
* Start/stop/restart service 
* Detaching from terminal (no need for nohup, java service wrapper...)
* All dependencies packaged as a single runnable JAR
* BSD style license

Command line options
--------------------

```sh
Addition daemon server opts:
 --start                             - detach from a terminal and run in background
 --stop                              - stop running server by pid
 --restart                           - restarts server by pid
 --pid file                          - PID file
 --chdir dir                         - change running directory

ERROR: No Contexts defined
Usage: java [-Djetty.home=dir] -jar jetty-runner.jar [--help|--version] [ server opts] [[ context opts] context ...] 
Server opts:
 --version                           - display version and exit
 --log file                          - request log filename (with optional 'yyyy_mm_dd' wildcard
 --out file                          - info/warn/debug log filename (with optional 'yyyy_mm_dd' wildcard
 --host name|ip                      - interface to listen on (default is all interfaces)
 --port n                            - port to listen on (default 8080)
 --stop-port n                       - port to listen for stop command
 --stop-key n                        - security string for stop command (required if --stop-port is present)
 [--jar file]*n                      - each tuple specifies an extra jar to be added to the classloader
 [--lib dir]*n                       - each tuple specifies an extra directory of jars to be added to the classloader
 [--classes dir]*n                   - each tuple specifies an extra directory of classes to be added to the classloader
 --stats [unsecure|realm.properties] - enable stats gathering servlet context
 [--config file]*n                   - each tuple specifies the name of a jetty xml config file to apply (in the order defined)
Context opts:<commit_msg>Prepare for release.<commit_after>Jetty Daemon Runner
===================

Ever wanted a servlet engine in a single runnabable JAR that could 
correctly daemonize and run WAR from a command line? 

Jetty  Daemon Runner improves over existing jetty-runner with JVM daemonization.
It's packaged as a single runnable jar you can use on Unix platforms
supported by Akuma/JNA.

[Download latest release (0.5)](https://github.com/vnesek/jetty-daemon-runner/releases/v0.5)

Usage
-----

* Start Jetty at port 8080 serving WAR at / as a daemon in background

```sh
	java -jar jetty-daemon.jar --start --pid some.pid some.war 
```

* Stop Jetty using pid file

```sh
	java -jar jetty-daemon.jar --stop --pid some.pid 
```

Features
--------
* Supports Java 8 on Unix
* Start/stop/restart service 
* Detaching from terminal (no need for nohup, java service wrapper...)
* All dependencies packaged as a single runnable JAR
* BSD style license

Command line options
--------------------

```
Addition daemon server opts:
 --start                             - detach from a terminal and run in background
 --stop                              - stop running server by pid
 --restart                           - restarts server by pid
 --pid file                          - PID file
 --chdir dir                         - change running directory

Usage: java [-Djetty.home=dir] -jar jetty-runner.jar [--help|--version] [ server opts] [[ context opts] context ...] 
Server opts:
 --version                           - display version and exit
 --log file                          - request log filename (with optional 'yyyy_mm_dd' wildcard
 --out file                          - info/warn/debug log filename (with optional 'yyyy_mm_dd' wildcard
 --host name|ip                      - interface to listen on (default is all interfaces)
 --port n                            - port to listen on (default 8080)
 --stop-port n                       - port to listen for stop command
 --stop-key n                        - security string for stop command (required if --stop-port is present)
 [--jar file]*n                      - each tuple specifies an extra jar to be added to the classloader
 [--lib dir]*n                       - each tuple specifies an extra directory of jars to be added to the classloader
 [--classes dir]*n                   - each tuple specifies an extra directory of classes to be added to the classloader
 --stats [unsecure|realm.properties] - enable stats gathering servlet context
 [--config file]*n                   - each tuple specifies the name of a jetty xml config file to apply (in the order defined)
Context opts:
{'fraction_non_alphanumeric': 0.0908041554444017, 'fraction_numerical': 0.004232397075798384, 'mean_word_length': 1.9175084175084176, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4950522', 'n_tokens_mistral': 1365, 'n_tokens_neox': 1285, 'n_words': 604}