tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russ Tremain <ru...@releasetools.org>
Subject confused by tomcat6/7 docs
Date Fri, 06 Jul 2012 02:54:19 GMT
Hi Oliver,

I must say I'm a bit confused by the examples & docs for tomcat7-maven-plugin.

I see reference to a "war:explode" goal, which doesn't seem to exist. 
The reference is here:

	http://tomcat.apache.org/maven-plugin-2.0-beta-1/context-goals.html

But when I dump the plugin documentation [1], I see no such goal.

What I would like to find out about the possibility to deploy an 
exploded war image to a local tomcat instance.

I've been successfully using the deploy (tomcat7:deploy) goal, but my 
developers are complaining that it is too slow.  I need to work out a 
method to use an exploded war.

Any help appreciated...

thanks!
-Russ

[1] mvn -Dplugin=tomcat7 -DgroupId=org.apache.tomcat.maven -Dfull help:describe
...
[INFO] org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-beta-1

Name: Apache Tomcat Maven Plugin :: Tomcat 7.x
Description: The Tomcat Maven Plugin provides goals to manipulate WAR
   projects within the Tomcat 7.x servlet container.
Group Id: org.apache.tomcat.maven
Artifact Id: tomcat7-maven-plugin
Version: 2.0-beta-1
Goal Prefix: tomcat7

This plugin has 8 goals:

tomcat7:deploy
   Description: Deploy a WAR to Tomcat.
   Implementation: org.apache.tomcat.maven.plugin.tomcat7.deploy.DeployMojo
   Language: java
   Before this mojo executes, it will call:
     Phase: 'package'

   Available parameters:

     charset (Default: ISO-8859-1)
       The URL encoding charset to use when communicating with Tomcat manager.

     contextFile
       The path of the Tomcat context XML file. This is not used for war
       deployment mode.

     ignorePackaging (Default: false)
       If set to true ignore if packaging of project is not 'war'.

     mode (Default: war)
       The deployment mode to use. This must be either war to deploy the war,
       context to deploy the context XML file, or both to deploy the war with
       the context XML file.

     password
       The password to use for deployment

     path (Default: /${project.artifactId})
       The webapp context path to use for the web application being run. This
       must always start with a forward-slash ('/').

     server
       The server id in settings.xml to use when authenticating with Tomcat
       manager, or null to use defaults of username admin and no password.

     tag
       The Tomcat webapp tag name to use.

     update (Default: false)
       Whether Tomcat should automatically undeploy webapps that already exist
       when deploying.

     url (Default: http://localhost:8080/manager/html)
       The full URL of the Tomcat manager instance to use.

     username
       The tomcat username to use for deployment

     warFile
       The path of the WAR file to deploy.

tomcat7:deploy-only
   Description: Deploy a WAR to Tomcat witjout forking the package lifecycle
   Implementation: org.apache.tomcat.maven.plugin.tomcat7.deploy.DeployOnlyMojo
   Language: java

   Available parameters:

     charset (Default: ISO-8859-1)
       The URL encoding charset to use when communicating with Tomcat manager.

     contextFile
       The path of the Tomcat context XML file. This is not used for war
       deployment mode.

     ignorePackaging (Default: false)
       If set to true ignore if packaging of project is not 'war'.

     mode (Default: war)
       The deployment mode to use. This must be either war to deploy the war,
       context to deploy the context XML file, or both to deploy the war with
       the context XML file.

     password
       The password to use for deployment

     path (Default: /${project.artifactId})
       The webapp context path to use for the web application being run. This
       must always start with a forward-slash ('/').

     server
       The server id in settings.xml to use when authenticating with Tomcat
       manager, or null to use defaults of username admin and no password.

     tag
       The Tomcat webapp tag name to use.

     update (Default: false)
       Whether Tomcat should automatically undeploy webapps that already exist
       when deploying.

     url (Default: http://localhost:8080/manager/html)
       The full URL of the Tomcat manager instance to use.

     username
       The tomcat username to use for deployment

     warFile
       The path of the WAR file to deploy.

tomcat7:exec-war
   Description: (no description available)
   Implementation: org.apache.tomcat.maven.plugin.tomcat7.run.ExecWarMojo
   Language: java
   Before this mojo executes, it will call:
     Phase: 'package'

   Available parameters:

     accessLogValveFormat (Default: %h %l %u %t )
       see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html

     attachArtifact (Default: true)
       Attach or not the generated artifact to the build (use true if you want
       to install or deploy it)

     attachArtifactClassifier (Default: exec-war)
       the classifier to use for the attached/generated artifact

     attachArtifactClassifierType (Default: jar)
       the type to use for the attached/generated artifact

     buildDirectory (Default: ${project.build.directory})
       (no description available)

     connectorHttpProtocol (Default: HTTP/1.1)
       which connector protocol to use HTTP/1.1 or
       org.apache.coyote.http11.Http11NioProtocol

     enableNaming (Default: false)
       to enable naming when starting tomcat

     extraDependencies
       list of extra dependencies to add in the standalone tomcat jar: your jdbc
       driver, mail.jar etc.. Those dependencies will be in root classloader.

     extraResources
       list of extra resources to add in the standalone tomcat jar: your logger
       configuration etc

     finalName (Default: ${project.artifactId}-${project.version}-war-exec.jar)
       Name of the generated exec JAR.

     mainClass (Default: org.apache.tomcat.maven.runner.Tomcat7RunnerCli)
       Main class to use for starting the standalone jar.

     path (Default: ${project.artifactId})
       The webapp context path to use for the web application being run. The
       name to store webapp in exec jar. Do not use /

     pluginArtifacts (Default: ${plugin.artifacts})
       (no description available)

     serverXml (Default: src/main/tomcatconf/server.xml)
       (no description available)

     tomcatConfigurationFilesDirectory (Default: src/main/tomcatconf)
       (no description available)

     warRunDependencies
       (no description available)

tomcat7:exec-war-only
   Description: (no description available)
   Implementation: org.apache.tomcat.maven.plugin.tomcat7.run.ExecWarOnlyMojo
   Language: java

   Available parameters:

     accessLogValveFormat (Default: %h %l %u %t )
       see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html

     attachArtifact (Default: true)
       Attach or not the generated artifact to the build (use true if you want
       to install or deploy it)

     attachArtifactClassifier (Default: exec-war)
       the classifier to use for the attached/generated artifact

     attachArtifactClassifierType (Default: jar)
       the type to use for the attached/generated artifact

     buildDirectory (Default: ${project.build.directory})
       (no description available)

     connectorHttpProtocol (Default: HTTP/1.1)
       which connector protocol to use HTTP/1.1 or
       org.apache.coyote.http11.Http11NioProtocol

     enableNaming (Default: false)
       to enable naming when starting tomcat

     extraDependencies
       list of extra dependencies to add in the standalone tomcat jar: your jdbc
       driver, mail.jar etc.. Those dependencies will be in root classloader.

     extraResources
       list of extra resources to add in the standalone tomcat jar: your logger
       configuration etc

     finalName (Default: ${project.artifactId}-${project.version}-war-exec.jar)
       Name of the generated exec JAR.

     mainClass (Default: org.apache.tomcat.maven.runner.Tomcat7RunnerCli)
       Main class to use for starting the standalone jar.

     path (Default: ${project.artifactId})
       The webapp context path to use for the web application being run. The
       name to store webapp in exec jar. Do not use /

     pluginArtifacts (Default: ${plugin.artifacts})
       (no description available)

     serverXml (Default: src/main/tomcatconf/server.xml)
       (no description available)

     tomcatConfigurationFilesDirectory (Default: src/main/tomcatconf)
       (no description available)

     warRunDependencies
       (no description available)

tomcat7:run
   Description: Runs the current project as a dynamic web application using an
     embedded Tomcat server.
   Implementation: org.apache.tomcat.maven.plugin.tomcat7.run.RunMojo
   Language: java
   Before this mojo executes, it will call:
     Phase: 'compile'

   Available parameters:

     addContextWarDependencies (Default: false)
       Will create a tomcat context for each dependencies of war type with
       'scope' set to 'tomcat'. In other words, dependencies with:
          <type>war</type>
          <scope>tomcat</scope>
       To preserve backward compatibility it's false by default.

     additionalClasspathDirs
       Additional optional directories to add to the embedded tomcat classpath.

     additionalConfigFilesDir (Default: ${basedir}/src/main/tomcatconf)
       The directory contains additional configuration Files that copied in the
       Tomcat conf Directory.

     addWarDependenciesInClassloader (Default: true)
       will add /WEB-INF/lib/*.jar and /WEB-INF/classes from war dependencies in
       the webappclassloader

     ajpPort (Default: 0)
       The AJP port to run the Tomcat server on. By default it's 0 this means
       won't be started. The ajp connector will be started only for value > 0.

     ajpProtocol (Default: org.apache.coyote.ajp.AjpProtocol)
       The AJP protocol to run the Tomcat server on. By default it's ajp. NOTE
       The ajp connector will be started only if ajpPort > 0. possible values
       are:
       - org.apache.coyote.ajp.AjpProtocol - new blocking Java connector that
         supports an executor
       - org.apache.coyote.ajp.AjpAprProtocol - the APR/native connector.

     backgroundProcessorDelay (Default: -1)
       represents the delay in seconds between each classPathScanning change
       invocation

     configurationDir
       The directory to create the Tomcat server configuration under.

     contextFile
       The path of the Tomcat context XML file.

     contextReloadable (Default: false)
       Force context scanning if you don't use a context file with reloadable =
       'true'. The other way to use contextReloadable is to add attribute
       reloadable = 'true' in your context file.

     delegate (Default: true)
       Set the 'follow standard delegation model' flag used to configure our
       ClassLoader.

     fork (Default: false)
       Set this to true to allow Maven to continue to execute after invoking the
       run goal.

     httpsPort (Default: 0)
       The https port to run the Tomcat server on. By default it's 0 this means
       won't be started. The https connector will be started only for value > 0.

     ignorePackaging (Default: false)
       If set to true ignore if packaging of project is not 'war'.

     keystoreFile
       Override the default keystoreFile for the HTTPS connector (if enabled)

     keystorePass
       Override the default keystorePass for the HTTPS connector (if enabled)

     path (Default: /${project.artifactId})
       The webapp context path to use for the web application being run. This
       must always start with a forward-slash ('/').

     pluginArtifacts
       (no description available)

     port (Default: 8080)
       The port to run the Tomcat server on.

     protocol (Default: HTTP/1.1)
       The protocol to run the Tomcat server on. By default it's HTTP/1.1.

     serverXml
       server.xml to use Note if you use this you must configure in this file
       your webapp paths.

     systemProperties
       List of System properties to pass to the Tomcat Server.

     tomcatLoggingFile
       The path of the Tomcat logging configuration.

     tomcatUsers
       The path of the Tomcat users XML file.

     tomcatWebXml
       overriding the providing web.xml to run tomcat

     uriEncoding (Default: ISO-8859-1)
       The character encoding to use for decoding URIs.

     useNaming (Default: true)
       Enables or disables naming support for the embedded Tomcat server.

       Note: This setting is ignored if you provide a server.xml for your
       Tomcat. Instead please configure naming in the server.xml.

     useSeparateTomcatClassLoader (Default: false)
       if true a new classLoader separated from maven core will be created to
       start tomcat.

     useTestClasspath (Default: false)
       will use the test classpath rather than the compile one and will add test
       dependencies too

     warSourceDirectory (Default: ${basedir}/src/main/webapp)
       The web resources directory for the web application being run.

tomcat7:run-war
   Description: Runs the current project as a packaged web application using
     an embedded Tomcat server.
   Implementation: org.apache.tomcat.maven.plugin.tomcat7.run.RunWarMojo
   Language: java
   Before this mojo executes, it will call:
     Phase: 'package'

   Available parameters:

     addContextWarDependencies (Default: false)
       Will create a tomcat context for each dependencies of war type with
       'scope' set to 'tomcat'. In other words, dependencies with:
          <type>war</type>
          <scope>tomcat</scope>
       To preserve backward compatibility it's false by default.

     additionalConfigFilesDir (Default: ${basedir}/src/main/tomcatconf)
       The directory contains additional configuration Files that copied in the
       Tomcat conf Directory.

     ajpPort (Default: 0)
       The AJP port to run the Tomcat server on. By default it's 0 this means
       won't be started. The ajp connector will be started only for value > 0.

     ajpProtocol (Default: org.apache.coyote.ajp.AjpProtocol)
       The AJP protocol to run the Tomcat server on. By default it's ajp. NOTE
       The ajp connector will be started only if ajpPort > 0. possible values
       are:
       - org.apache.coyote.ajp.AjpProtocol - new blocking Java connector that
         supports an executor
       - org.apache.coyote.ajp.AjpAprProtocol - the APR/native connector.

     configurationDir
       The directory to create the Tomcat server configuration under.

     contextFile
       The path of the Tomcat context XML file.

     contextReloadable (Default: false)
       Force context scanning if you don't use a context file with reloadable =
       'true'. The other way to use contextReloadable is to add attribute
       reloadable = 'true' in your context file.

     fork (Default: false)
       Set this to true to allow Maven to continue to execute after invoking the
       run goal.

     httpsPort (Default: 0)
       The https port to run the Tomcat server on. By default it's 0 this means
       won't be started. The https connector will be started only for value > 0.

     ignorePackaging (Default: false)
       If set to true ignore if packaging of project is not 'war'.

     keystoreFile
       Override the default keystoreFile for the HTTPS connector (if enabled)

     keystorePass
       Override the default keystorePass for the HTTPS connector (if enabled)

     path (Default: /${project.artifactId})
       The webapp context path to use for the web application being run. This
       must always start with a forward-slash ('/').

     pluginArtifacts
       (no description available)

     port (Default: 8080)
       The port to run the Tomcat server on.

     protocol (Default: HTTP/1.1)
       The protocol to run the Tomcat server on. By default it's HTTP/1.1.

     serverXml
       server.xml to use Note if you use this you must configure in this file
       your webapp paths.

     systemProperties
       List of System properties to pass to the Tomcat Server.

     tomcatLoggingFile
       The path of the Tomcat logging configuration.

     tomcatUsers
       The path of the Tomcat users XML file.

     tomcatWebXml
       overriding the providing web.xml to run tomcat

     uriEncoding (Default: ISO-8859-1)
       The character encoding to use for decoding URIs.

     useNaming (Default: true)
       Enables or disables naming support for the embedded Tomcat server.

       Note: This setting is ignored if you provide a server.xml for your
       Tomcat. Instead please configure naming in the server.xml.

     useSeparateTomcatClassLoader (Default: false)
       if true a new classLoader separated from maven core will be created to
       start tomcat.

     warDirectory
       The path of the exploded WAR directory to run.

tomcat7:run-war-only
   Description: Runs the current project as a packaged web application using
     an embedded Tomcat server without forking the package cycle.
   Implementation: org.apache.tomcat.maven.plugin.tomcat7.run.RunWarOnlyMojo
   Language: java

   Available parameters:

     addContextWarDependencies (Default: false)
       Will create a tomcat context for each dependencies of war type with
       'scope' set to 'tomcat'. In other words, dependencies with:
          <type>war</type>
          <scope>tomcat</scope>
       To preserve backward compatibility it's false by default.

     additionalConfigFilesDir (Default: ${basedir}/src/main/tomcatconf)
       The directory contains additional configuration Files that copied in the
       Tomcat conf Directory.

     ajpPort (Default: 0)
       The AJP port to run the Tomcat server on. By default it's 0 this means
       won't be started. The ajp connector will be started only for value > 0.

     ajpProtocol (Default: org.apache.coyote.ajp.AjpProtocol)
       The AJP protocol to run the Tomcat server on. By default it's ajp. NOTE
       The ajp connector will be started only if ajpPort > 0. possible values
       are:
       - org.apache.coyote.ajp.AjpProtocol - new blocking Java connector that
         supports an executor
       - org.apache.coyote.ajp.AjpAprProtocol - the APR/native connector.

     configurationDir
       The directory to create the Tomcat server configuration under.

     contextFile
       The path of the Tomcat context XML file.

     contextReloadable (Default: false)
       Force context scanning if you don't use a context file with reloadable =
       'true'. The other way to use contextReloadable is to add attribute
       reloadable = 'true' in your context file.

     fork (Default: false)
       Set this to true to allow Maven to continue to execute after invoking the
       run goal.

     httpsPort (Default: 0)
       The https port to run the Tomcat server on. By default it's 0 this means
       won't be started. The https connector will be started only for value > 0.

     ignorePackaging (Default: false)
       If set to true ignore if packaging of project is not 'war'.

     keystoreFile
       Override the default keystoreFile for the HTTPS connector (if enabled)

     keystorePass
       Override the default keystorePass for the HTTPS connector (if enabled)

     path (Default: /${project.artifactId})
       The webapp context path to use for the web application being run. This
       must always start with a forward-slash ('/').

     pluginArtifacts
       (no description available)

     port (Default: 8080)
       The port to run the Tomcat server on.

     protocol (Default: HTTP/1.1)
       The protocol to run the Tomcat server on. By default it's HTTP/1.1.

     serverXml
       server.xml to use Note if you use this you must configure in this file
       your webapp paths.

     systemProperties
       List of System properties to pass to the Tomcat Server.

     tomcatLoggingFile
       The path of the Tomcat logging configuration.

     tomcatUsers
       The path of the Tomcat users XML file.

     tomcatWebXml
       overriding the providing web.xml to run tomcat

     uriEncoding (Default: ISO-8859-1)
       The character encoding to use for decoding URIs.

     useNaming (Default: true)
       Enables or disables naming support for the embedded Tomcat server.

       Note: This setting is ignored if you provide a server.xml for your
       Tomcat. Instead please configure naming in the server.xml.

     useSeparateTomcatClassLoader (Default: false)
       if true a new classLoader separated from maven core will be created to
       start tomcat.

     warDirectory
       The path of the exploded WAR directory to run.

tomcat7:shutdown
   Description: Shuts down all possibly started embedded tomcat servers. This
     will be automatically down through a shutdown hook or you may call this
     Mojo to shut them down explictly.

     By default the shutdown goal is not bound to any phase. For integration
     tests you might want to bind it to post-integration-test.
   Implementation: org.apache.tomcat.maven.plugin.tomcat7.run.ShutdownMojo
   Language: java

   Available parameters:

     path (Default: /${project.artifactId})
       The webapp context path to use for the web application being run. This
       must always start with a forward-slash ('/').

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message