Title: TomEE Maven Plugin Inspired by the Jetty Maven Plugin, the TomEE Maven Plugin is a feature-rich plugin that allows for: - easy provisioning of a TomEE server - server start and stop - application deploy and undeploy Simply add the following to your `pom.xml` org.apache.openejb.maven tomee-maven-plugin 1.0.0 1.5.0 plus The available commands can be discovered running: mvn tomee:help Should print output like the following: [INFO] Available commands: [INFO] - tomee:run: run and wait for the server [INFO] - tomee:debug: run in debug mode and wait for the server (alias of run) [INFO] - tomee:start: run the server [INFO] - tomee:stop: stop the server (to use with start) [INFO] - tomee:configtest: run configtest tomcat command [INFO] - tomee:deploy : deploy path archive [INFO] - tomee:undeploy : undeploy path archive. Note it should be the same path than the one used in deploy command [INFO] - tomee:list: list ejbs deployed [INFO] - tomee:build: build tomee but does not start it [INFO] - tomee:help: this Available configuration elements:
Name Description
tomeeShutdownPort The http port to use.
tomeeHttpPort The shutdown port to use.
args Additional JVM arguments.
debug Activate remote debugging on TomEE.
debugPort Port to use for remote debugging when debug=true.
config Folder containing your custom configuration (src/main/tomee/conf by default).
bin Folder containing your custom scripts (src/main/tomee/bin by default).
lib Folder containing your custom libraries (src/main/tomee/lib by default).
systemVariables Additional system properties.
libs Additional libraries put in tomee/lib. It understands maven format groupId:artifactId:version
webapps Additional webapps. It understands maven format too.
apps Additional ear or jar/ejbmodule. It understands maven format too.
warFile Path to the webapp, default is using the war of current project.
removeDefaultWebapps Remove or not tomcat webapps (manager, host-managerÉ) to gain some seconds at startup.
removeTomeeWebapp Remove TomEE webapp (Admin GUI + EJbd transport)
keepServerXmlAsthis If a server.xml was provided don't use port configuration to change it (Note: the stopport should match the configured one.)
tomeeVersion The version of the TomEE artifact used to deploy the application.
tomeeGroupId The groupId of the TomEE artifact used to deploy the application.
tomeeArtifactId The artifactId of the TomEE artifact used to deploy the application
tomeeType The type of the TomEE artifact used to deploy the application (zip).
tomeeClassifier The classifier of the TomEE artifact used to deploy the application (zip).
skipCurrentProject Don't try to deploy current project even if it is a war. (default to false)
quickSession Use a quick session id generator (Random instead of SecuredRandom - default to true)
## Some more tweak The lib tag allows to enrich the container with some additional librairies. It supports some interesting pattern to complete the default maven format. * remove:<some prefix of jar in lib folder>: remove all jar starting with the specified prefix * unzip:<some maven zip>: extract the zip in lib folder * ?name=<new-name>: rename the libary once copied in lib folder Note: the name tweak can be used to rename applications too ## Provisioning Example This plugin is also usable in projects which are not war. For instance you can use it in a pom project to setup a TomEE install, add libraries, deploy apps then run the server. org.apache.openejb.maven tomee-maven-plugin 1.0.0 1.5.0 plus false 5005 -Dfoo=bar ${project.basedir}/src/test/tomee/conf mysql:mysql-connector-java:5.1.20 org.superbiz:myapp:4.3?name=ROOT org.superbiz:api:1.1 org.superbiz:mybugapp:3.2:ear mysql:mysql-connector-java:5.1.21 unzip:org.superbiz:hibernate-bundle:4.1.0.Final:zip remove:openjpa-