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 deployment and undeployment Simply add the following to the , and optionally the ), section of your `pom.xml` org.apache.openejb.maven tomee-maven-plugin 1.7.1 1.7.1 plus ###Plugin Goals
Goal Description
tomee:build Create TomEE, but do not run it.
tomee:configtest Run the Apache Tomcat `configtest` command.
tomee:debug Same as `run` but with debug activated on the default or specified port.
tomee:deploy Deploy an application in a running TomEE.
tomee:exec Creates an executable jar of the application.
tomee:help Display help information on the tomee-maven-plugin.
Call mvn tomee:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
tomee:list Largely inspired by the OpenEJB command helper, but with some differences. List deployed EJB's in a running TomEE.
tomee:run Start and wait for TomEE.
tomee:start Start TomEE and continue.
tomee:stop Stop a TomEE started with start command.
tomee:undeploy Undeploy an application in a running TomEE
Note that for the tomee:deploy and tomee:undeploy goals, the path can either be specified within the section of the `pom.xml` using the parameter, or it can be passed via the user property tomee-plugin.archive. If a relative path is passed for the deploy path archive, this must be relative to the TomEE server. Note 2: running tomee maven plugin you can type 'quit' directly in the console to shutdown correctly the server. 'reload' is also available when internal openejb application is deployed. ###More Tweaks The lib tag allows to enrich the container with some additional libraries. Some interesting patterns in addition to the default maven formats are supported. * 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.7.1 1.7.1 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- ###Auto Reloading Example org.apache.openejb.maven tomee-maven-plugin 1.7.1 .class true The Synchronization block supports the following configuration options: * resourcesDir (default src/main/webapp) * binariesDir (default target/classes) * targetBinariesDir (default tomee/webapps/finalName/WEB-INF/classes) * targetResourcesDir (default tomee/webapps/finalName) * updateInterval (default 5 - in second) * extensions (default html, xhtml, js and css) * regex: a regex should match files to take into account when updating reloadOnUpdate means to reload the entire context (webapp). This means undeploying/redeploying the application.