Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E2018BA00 for ; Tue, 10 Jan 2012 14:00:08 +0000 (UTC) Received: (qmail 21909 invoked by uid 500); 10 Jan 2012 13:28:21 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 21684 invoked by uid 500); 10 Jan 2012 13:27:59 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 21342 invoked by uid 99); 10 Jan 2012 13:27:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 13:27:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 13:27:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 433492388ABB for ; Tue, 10 Jan 2012 13:27:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1229532 - in /tomcat/maven-plugin/trunk/src/site/apt: index.apt.vm run-mojo-features.apt.vm Date: Tue, 10 Jan 2012 13:27:12 -0000 To: dev@tomcat.apache.org From: olamy@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120110132712.433492388ABB@eris.apache.org> Author: olamy Date: Tue Jan 10 13:27:11 2012 New Revision: 1229532 URL: http://svn.apache.org/viewvc?rev=1229532&view=rev Log: documentation on run mojo Added: tomcat/maven-plugin/trunk/src/site/apt/run-mojo-features.apt.vm (with props) Modified: tomcat/maven-plugin/trunk/src/site/apt/index.apt.vm Modified: tomcat/maven-plugin/trunk/src/site/apt/index.apt.vm URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/src/site/apt/index.apt.vm?rev=1229532&r1=1229531&r2=1229532&view=diff ============================================================================== --- tomcat/maven-plugin/trunk/src/site/apt/index.apt.vm (original) +++ tomcat/maven-plugin/trunk/src/site/apt/index.apt.vm Tue Jan 10 13:27:11 2012 @@ -42,6 +42,9 @@ Apache Tomcat Maven Plugin The Tomcat Maven Plugin provides goals to manipulate WAR projects within the {{{http://tomcat.apache.org/}Apache Tomcat}} servlet container. + Or to run your war project in an embeded Apache Tomcat. The run goal give you the opportunity to develop quickly your application without any + huge install to do manually. More details and features: {{{./run-mojo-features.html}see documentation}}. + * groupId and Mojo name change Since version 2.0-beta-1 tomcat mojos has been renamed to tomcat6 and tomcat7 with the same goals. @@ -89,9 +92,9 @@ Apache Tomcat Maven Plugin * Know limitations - Some goals are not yet available in tomcat7 mojo. Those {{{./container-goals.html}contains goals}} are available with + Some goals are not yet available in tomcat7 mojo. Those {{{./container-goals.html}container goals}} are available with the tomcat6 mojo, you only need to update the manager url in your pom. - Use <<>> rather than the default tomcat6 url. + Use <<>> rather than the default tomcat6 url. Added: tomcat/maven-plugin/trunk/src/site/apt/run-mojo-features.apt.vm URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/src/site/apt/run-mojo-features.apt.vm?rev=1229532&view=auto ============================================================================== --- tomcat/maven-plugin/trunk/src/site/apt/run-mojo-features.apt.vm (added) +++ tomcat/maven-plugin/trunk/src/site/apt/run-mojo-features.apt.vm Tue Jan 10 13:27:11 2012 @@ -0,0 +1,142 @@ + --- + Run Mojo + --- + Oliver Lamy + --- + 2011-01-10 + --- + + ~~ Licensed to the Apache Software Foundation (ASF) under one + ~~ or more contributor license agreements. See the NOTICE file + ~~ distributed with this work for additional information + ~~ regarding copyright ownership. The ASF licenses this file + ~~ to you under the Apache License, Version 2.0 (the + ~~ "License"); you may not use this file except in compliance + ~~ with the License. You may obtain a copy of the License at + ~~ + ~~ http://www.apache.org/licenses/LICENSE-2.0 + ~~ + ~~ Unless required by applicable law or agreed to in writing, + ~~ software distributed under the License is distributed on an + ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~~ KIND, either express or implied. See the License for the + ~~ specific language governing permissions and limitations + ~~ under the License. + + ~~ NOTE: For help with the syntax of this file, see: + ~~ http://maven.apache.org/doxia/references/apt-format.html + +Run Mojo: run your Maven war project quickly ! + + When developping a war project, you usually build your war and deploy it to an installed Tomcat instance. + This is time and resources consuming and take time to install locally the instance. + + The run mojo give you the opportunity to save that by simply running your war inside an embeded Tomcat instance in your Maven build. + + <<>> If you have a multi module Maven projects and use Maven3, you don't need to install all modules before use the run goal, + just use tomcat6/7:run from the root module and the plugin will auto detect build output directory from various modules and replace + dependencies with those directories in the webapp classloader. + +* Run an embeded Tomcat + + Configure your pom with the plugin version (for other mojo parameters see each mojo documentation details). + + And use: mvn tomcat6/7:run + ++--------------------- + + org.apache.tomcat.maven + tomcat7-maven-plugin + + ${project.version} + + + 9090 + + / + + ${tomcatContextXml} + + + ${project.build.directory}/appserver-base + ${project.build.directory}/appserver-home + ${project.build.directory}/appserver-base/logs + ${project.build.directory} + + + false + + + + + + + + + org.apache.derby + derby + ${derbyVersion} + + + javax.mail + mail + 1.4 + + + + ++--------------------- + +* Maven project structure + ++--------------------- + pom.xml (top level pom with packaging pom) + my-api/pom.xml (api project with packaging jar) + my-api-impl/pom.xml (api implementation project with packaging jar) + my-webapp/pom.xml (webapp project with packaging war) + ++--------------------- + + With a such structure, from the top level directory use mvn tomcat6/7:run -pl :my-webapp -am. + +* Use it with selenium mojo + + You can use the mojo, to start your application in a Tomcat instance and run you selenium test against this instance. + + The following configuration will start an emdeded tomcat in pre-integration-test and stop it in post-integration-test. + ++--------------------- + + + org.apache.tomcat.maven + tomcat7-maven-plugin + + ${project.version} + + + tomcat-run + + run-war-only + + pre-integration-test + + .... + true + .... + + + + tomcat-shutdown + + shutdown + + post-integration-test + + + + ++--------------------- Propchange: tomcat/maven-plugin/trunk/src/site/apt/run-mojo-features.apt.vm ------------------------------------------------------------------------------ svn:eol-style = native Propchange: tomcat/maven-plugin/trunk/src/site/apt/run-mojo-features.apt.vm ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org