Meecrowave Command Line Interface

Meecrowave provides a CLI (Command Line Interface) called org.apache.meecrowave.runner.Cli.

It can be used to deploy the java classpath or a war. Here are the main options:

Name Description

--tomcat-antiresourcelocking

Should Tomcat anti resource locking feature be activated on StandardContext.

--cdi-conversation

Should CDI conversation be activated

--client-auth

HTTPS keystore client authentication

--conf

Conf folder to synchronize

--connector

Custom connectors

--tomcat-context-configurer

Configurers for all webapps. The Consumer<Context> instances will be applied to all deployments.

--cxf-servlet-params

Init parameters passed to CXF servlet

--default-ssl-hostconfig-name

The name of the default SSLHostConfig that will be used for secure https connections.

--delete-on-startup

Should the directory be cleaned on startup if existing

--dir

Root folder if provided otherwise a fake one is created in tmp-dir

--host

Default host

--http2

Activate HTTP 2

--http

HTTP port

--https

HTTPS port

--cxf-initialize-client-bus

Should the client bus be set. If false the server one will likely be reused.

--servlet-container-initializer

ServletContainerInitializer instances.

--servlet-container-initializer-injection

Should ServletContainerInitialize support injections.

--jaxrs-beanvalidation

Should bean validation be activated on JAX-RS endpoint if present in the classpath.

--jaxrs-default-providers

If jaxrsProviderSetup is true the list of default providers to load (or defaulting to johnson jsonb and jsonp ones)

--jaxrs-log-provider

Should JAX-RS providers be logged

--jaxrs-mapping

Default jaxrs mapping

--jaxrs-provider-setup

Should default JAX-RS provider be configured

--jaxws-support-if-present

Should @WebService CDI beans be deployed if cxf-rt-frontend-jaxws is in the classpath.

--jsonb-binary-strategy

Should JSON-B provider prettify the output

--jsonb-encoding

Which encoding provider JSON-B should use

--jsonb-ijson

Should JSON-B provider comply to I-JSON

--jsonb-naming-strategy

Should JSON-B provider prettify the output

--jsonb-nulls

Should JSON-B provider serialize nulls

--jsonb-order-strategy

Should JSON-B provider prettify the output

--jsonb-prettify

Should JSON-B provider prettify the output

--jsonp-buffer-strategy

JSON-P JAX-RS provider buffer strategy (see johnzon)

--jsonp-read-buffer-length

JSON-P JAX-RS provider read buffer limit size (see johnzon)

--jsonp-max-string-length

JSON-P JAX-RS provider max string limit size (see johnzon)

--jsonp-write-buffer-length

JSON-P JAX-RS provider write buffer limit size (see johnzon)

--jsonp-supports-comment

Should JSON-P JAX-RS provider prettify the outputs (see johnzon)

--jsonp-supports-comment

Should JSON-P JAX-RS provider support comments (see johnzon)

--keep-server-xml-as-this

Don’t replace ports in server.xml

--keystore-alias

HTTPS keystore alias

--keystore-file

HTTPS keystore location

--keystore-password

HTTPS keystore password

--keystore-type

HTTPS keystore type

--logging-global-setup

Should logging be configured to use log4j2 (it is global)

--login-config

web.xml login config

--meecrowave-properties

Loads a meecrowave properties, defaults to meecrowave.properties.

--pid-file

A file path to write the process id if the server starts

--properties

Passthrough properties

--quick-session

Should an unsecured but fast session id generator be used

--realm

realm

--roles

In memory roles

--scanning-exclude

A forced exclude list of jar names (comma separated values)

--scanning-include

A forced include list of jar names (comma separated values)

--scanning-package-exclude

A forced exclude list of packages names (comma separated values)

--scanning-package-include

A forced include list of packages names (comma separated values)

--security-constraint

web.xml security constraint

--server-xml

Provided server.xml

--shared-libraries

A folder containing shared libraries.

--skip-http

Skip HTTP connector

--ssl

Use HTTPS

--ssl-protocol

HTTPS protocol

--stop

Shutdown port if used or -1

--tmp-dir

Temporary directory

--tomcat-access-log-pattern

Activates and configure the access log valve. Value example: '%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'

--tomcat-default-setup

Add default servlet

--tomcat-filter

A Tomcat JarScanFilter

--tomcat-default-setup-jsp-development

Should JSP support if available be set in development mode

--tomcat-skip-jmx

(Experimental) Should Tomcat MBeans be skipped.

--tomcat-scanning

Should Tomcat scanning be used (@HandleTypes, @WebXXX)

--tomcat-wrap-loader

(Experimental) When deploying a classpath (current classloader), should meecrowave wrap the loader to define another loader identity but still use the same classes and resources.

--log4j2-jul-bridge

Should JUL logs be redirected to Log4j2 - only works before JUL usage.

--use-shutdown-hook

Use shutdown hook to automatically stop the container on Ctrl+C

--tomcat-default

Should Tomcat default be set (session timeout, mime mapping etc…​)

--users

In memory users

--watcher-bouncing

Activate redeployment on directories update using this bouncing.

--web-resource-cached

Cache web resources

--web-session-cookie-config

Force the cookie-config, it uses a properties syntax with the keys being the web.xml tag names.

--web-session-timeout

Force the session timeout for webapps

--web-xml

Global web.xml

--help

Show the CLI help/usage

--context

The context to use to deploy the webapp

--webapp

Location of the webapp, if not set the classpath will be deployed

--docbase

Location of the docbase for a classpath deployment

Note that help command is supported as well.

Extending the CLI

You can add your own CLI options implementing org.apache.meecrowave.runner.Cli$Options (just a marker interface, no logic to code) and use @CliOption to define fields as coming from the CLI arguments. To register your option bean just add it in META-INF/services/org.apache.meecrowave.runner.Cli$Options.

Meecrowave.Builder provides a getExtension(type) which can be used to get this kind of extension. This is common and works in all modes (arquillian, JUnit, embedded etc…​) replacing the arguments by properties on Meecrowave.Builder instance.