From 02a7a56b86120ff87314f5af2d60045518326609 Mon Sep 17 00:00:00 2001
From: plynch
- This page offers some general information about the appserver control
- features of the J2EE plug-in. Specific details about
- related targets and
- their properties can be found elsewhere.
+ The Maven J2EE Plugin appserver control features have been migrated to a
+ standalone Maven appserver plugin. For more information see the appserver
+ plugin documentation.
- When developing a web application (or website for that matter), each developer
- working on the project needs to have an environment to run and test their
- application. Rather than store a complete application server install in source
- control, it is much more feasible to have a centralized install of that
- application server. Then, using only the minimum configuration files the
- developer can control a separate isolated instance of the application server
- on their machine.
-
- The Maven J2EE plug-in appserver features use this technique to install and control
- application server instances for your project needs. The appserver
- features are not for
- deploying webapps or war files into application servers.
-
- The following table shows the various appserver versions that are
- supported by the appserver control features of the Maven J2EE plug-in
- and what propety values are required to be set in order for the
- maven:appserver-* targets to work with those versions.
- The following application servers are expected to be supported soon:
- To make life even easier when using the appserver targets, the Maven J2EE
- plug-in includes a proxy build file. This means a file similar to the one
- below is copied to the directory specified by
- ${maven.appserver.dir}.
- Using this build file, you can run the appserver related targets quickly
- from within your ${maven.appserver.dir} directory. Typing simply can stop, re-install, and re-start a started server instance.
-
-
-
-
- Server
- ${maven.appserver.name}
- ${maven.appserver.version}
- ${maven.j2ee.version}
-
-
- Tomcat 4.x
-
- tomcat
- 40
- 12 or 13
- ${maven.appserver.dir}/build.xml
- This document describes the supplied + This document describes the supplied goals that are available when using the J2EE Plug-in with Maven.
- Please refer to the + Please refer to the Integration document for more information on how to integrate these goals into your project. @@ -46,24 +46,6 @@
EAR file.${maven.appserver.dir}
- property.${maven.j2ee.ear.appxml}
- property defines the location of this file. It defaults to
+ property defines the location of this file. It defaults to
src/application.xml
@@ -185,7 +167,7 @@
project.xml
- may be included by adding the ear.bundle.jar property to the
+ may be included by adding the ear.bundle.jar property to the
properties, e.g.
- The j2ee:appserver-install target installs the minimum
- directory and file structure necessary for an individual application
- server instance. Once the structure is created inside the
- directory specified by ${maven.appserver.dir}
- , configuration files are installed using the copy task and the filter
- mechanism built into Ant.
- The exact work done by this target is specific to the
- name and version of the application server you specify using
- ${maven.appserver.name}
- and ${maven.appserver.version}
- properties.
-
- Optionally, you can invoke the install target of the
- Ant build.xml file copied to ${maven.appserver.dir} instead. See the
- appserver proxy build file for more
- information.
-
- During the configuration process, all - maven.appserver.* properties - are used as filter tokens while files in - ${maven.conf.dir}/${maven.appserver.name}${maven.appserver.version} are - copied to ${maven.appserver.dir}. By default, certain files are - excluded from copying to ${maven.appserver.dir}. Files excluded are: -
-- This allows you to keep you webapp specific conf files in the same - directory and not have them installed with this target needlessly. -
-- Your configuration files may require additional processing ( using additional - filter tokens for example). In that case you can use the - maven-post-appserver-install - callback target to re-configure files. -
-- This target has different behavior - depending on the current status of the application server. The - behavior is defined by the following rules: -
-| Server Status | Behavior |
|---|---|
| Not Installed | -- Install and configure the application server. - | -
| Installed and stopped | -- Re-install/re-configure the application server. - | -
| Installed and started | -- Stop, re-install/re-configure, re-start the application server. - | -
Note: In all situations, the j2ee:appserver-install
- target will overwrite existing appserver configuration files already
- installed. Maven does this because it cannot know if the you have changed
- your maven.appserver.* related properties,
- so it always re-configures the configuration files. Since this
- operation has low overhead, it is considered a feature that allows dynamic
- updates to your appserver related property values.
- The j2ee:appserver-start target
- attempts to start the application server instance you have specified
- via properties.
-
Optionally, you can invoke the start target of the
- Ant build.xml file copied to ${maven.appserver.dir} instead. See the
- appserver proxy build file for more
- information.
-
- This target will cause two processes to run. One process will - represent the running of the Ant build file for the Maven target. - The other will be the forked JVM that actually starts the application - server instance. -
-- If you don't want the processes to block your current terminal, - you can execute the call to this target in the background using the - traditional '&' directive on unix-like systems. -
-For example, to run the server in the background, go to your - ${maven.appserver.dir} directory and type:
-- This target has different behavior - depending on the current status of the application server. The - behavior is defined by the following rules: -
-| Server Status | Behavior |
|---|---|
| Not Installed | -- Install/configure, then start the application server. - | -
| Installed and stopped | -- Start the application server. - | -
| Installed and started | -- Stop and then re-start the application server. This is useful for - application servers that are not set to auto-reload resources. - | -
- The j2ee:appserver-stop target
- attempts to stop the application server instance you have specified
- via the maven.appserver.* properties.
-
Optionally, you can invoke the stop target of the
- Ant build.xml file copied to ${maven.appserver.dir} instead. See the
- appserver proxy build file for more
- information.
-
- This target only has relevance if the application server instance - is actually started. All other situations do nothing. -
-
- The j2ee:appserver-clean target
- attempts to safely delete the directory specified by
- ${maven.appserver.dir}.
-
- This target has different behavior - depending on the current status of the application server. The - behavior is defined by the following rules: -
-| Server Status | Behavior |
|---|---|
| Installed and stopped | -- Deletes the directory specified by ${maven.appserver.dir}. - | -
| Installed and started | -- Stop the application server instance and then delete the directory - specified by ${maven.appserver.dir}. - | -