SlideShare a Scribd company logo
Apache Tomcat Maven Plugin
© Talend 2011 2
Agenda
 Overview and history
 What you can do:
 Run your war project in an embeded Apache Tomcat within your Apache
Maven build
 Deploy your war in a running Apache Tomcat instance
 Features recently implemented
 Questions
© Talend 2011 3
/me
Olivier Lamy Open Source Architecte @Talend in the Apache Team.
 Apache Member : PMC Maven/Archiva, Commons, Tomcat, Incubator :
Sqoop, Kalumet, DirectMemory
 Jenkins committer
 Mojo committer
 Etc... (add bugs in various open source projects)
Web Ids :
 Twitter: twitter.com/olamy
 Blog: olamy.blogspot.com
© Talend 2011 4
Overview and history
Developpement started in Mojo at Codehaus early 2006.
For trademark issue move to Apache Tomcat umbrella in 2011.
Now developpement at Apache with groupId change to
org.apache.tomcat.maven and Mojos renamed to tomcat6 :* with
support added of Tomcat7 tomcat7 :*
© Talend 2011 5
Running an embeded Apache Tomcat
Simply use mvn tomcat*:run to run your Apache Maven war project.
No Apache Tomcat to install locally. Maven will download all necessary
jars to run an embeded Tomcat.
In Maven3 multi modules project, reactors projects automatically
added to the webapp classloader : no need to install all jars
dependencies.
Easy developpement of webapp : no need of restart/install war when
modifying jsp/css etc...
Debug in your ide with mvnDebug.
© Talend 2011 6
Deployment in Apache Tomcat
Deploy your Apache Maven project in a running Apache Tomcat
instance.
Attach the deploy goal to the deploy phase in a profile and your build
war will be deploy in a running Tomcat instance.
Simple : mvn deploy -Ptdeploy
Run the Maven lifecycle (build your war, deploy it to your Repo Man
and deploy it to your Tomcat instance)
© Talend 2011 7
Executable jar/war
Mojo goal to build a standalone jar to run your war.
Jar will include your webapps and all necessary Tomcat jars.
Cli : mvn tomcat7:exec-war produces a jar my-project-exec-war.jar
Simply your project : jar -jar my-project-exec-war.jar
Come with some default setup: http port, default server.xml
But optionnal cli options : -httpPort -ajpPort etc.. (RTFM :-) )
© Talend 2011 8
Maven archetype
There is now an archetype :
mvn archetype:generate 
-DarchetypeGroupId=org.apache.tomcat.maven 
-DarchetypeArtifactId=tomcat-maven-archetype 
-DarchetypeVersion=2.0-SNAPSHOT
Generate a standard multi modules Maven project :
* basic-api (service interface)
* basic-api-impl (service default impl).
* basic-webapp (our webapp module)
* basic-webapp-exec (module to generated executable war)
* basic-webapp-it (module to run selenium tests with generated war)
Merci !
Questions ?

More Related Content

PDF
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
PPTX
Composer
PDF
Vagrant for local and team WordPress Development
PDF
What's new in Meteor 1.3?
PDF
Keeping up with Java made easy with Apache Maven (Devoxx 2018)
PPTX
Apache Maven and Java 9 and 10 (Devoxx France 2018)
PPT
Sleep Peacefully as Maven Tycho Builds your Product
KEY
ActiveLAMP Process
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
Composer
Vagrant for local and team WordPress Development
What's new in Meteor 1.3?
Keeping up with Java made easy with Apache Maven (Devoxx 2018)
Apache Maven and Java 9 and 10 (Devoxx France 2018)
Sleep Peacefully as Maven Tycho Builds your Product
ActiveLAMP Process

What's hot (20)

PPTX
Composer Lightning Talk
PDF
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
PPTX
Branching Strategies For Git and Subversion
PPTX
Maven 3 New Features
PDF
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
PDF
Meteor presentation
PDF
NCUG 2019: Super charge your API’s with Reactive streams
PDF
Automated Deployment with Maven - going the whole nine yards
PDF
"13 ways to run web applications on the Internet" Andrii Shumada
PDF
Symfony4 - Deep dive
PPTX
Integration testing with specs formvc
PDF
Setting Up Your Local Dev Environment
PPTX
Jenkins introduction
PDF
Intro 2 docker
PDF
What's New in AppFuse 2.0
PDF
Build Automation using Maven
PDF
Atom IDE
PDF
Securing Legacy CFML Code
Composer Lightning Talk
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Branching Strategies For Git and Subversion
Maven 3 New Features
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
Meteor presentation
NCUG 2019: Super charge your API’s with Reactive streams
Automated Deployment with Maven - going the whole nine yards
"13 ways to run web applications on the Internet" Andrii Shumada
Symfony4 - Deep dive
Integration testing with specs formvc
Setting Up Your Local Dev Environment
Jenkins introduction
Intro 2 docker
What's New in AppFuse 2.0
Build Automation using Maven
Atom IDE
Securing Legacy CFML Code
Ad

Viewers also liked (20)

PPTX
Evaluating Hypotheses using SPARQL-DL as an abstract workflow language to cho...
ODP
Heapoff memory wtf
KEY
Migrate, Grow, and Cultivate your Community
PDF
SmartBrief Portfolio
PPTX
My staff
PDF
Encouraging Curriculum Change in the Netherlands
PDF
Tutorial 1.1 - Import Intogen tumor types
PDF
Portfolio PlusAnimations 2009 ENG
ODP
Juc paris olivier lamy talk
PPS
ANDRE BOCELLI- SUIZA
PPTX
Lectores estrellas de Primaria
PPS
¡LA INTERNACIONALIZACIÓN DE LA AMAZONA!
PDF
Glanz Industries, Inc.
PPT
PPTX
Web Science, SADI, and the Singularity
PDF
Combine Experiments
PDF
Sony Ericsson case study; from 300k to 3 million Facebook fans in under 9 months
PDF
Building SADI Services Tutorial - SIB Workshop, Geneva, December 2015
KEY
Building a Mega Community with PressWork
PDF
It’s a WIN, WIN: ‘WordPress On Windows’
Evaluating Hypotheses using SPARQL-DL as an abstract workflow language to cho...
Heapoff memory wtf
Migrate, Grow, and Cultivate your Community
SmartBrief Portfolio
My staff
Encouraging Curriculum Change in the Netherlands
Tutorial 1.1 - Import Intogen tumor types
Portfolio PlusAnimations 2009 ENG
Juc paris olivier lamy talk
ANDRE BOCELLI- SUIZA
Lectores estrellas de Primaria
¡LA INTERNACIONALIZACIÓN DE LA AMAZONA!
Glanz Industries, Inc.
Web Science, SADI, and the Singularity
Combine Experiments
Sony Ericsson case study; from 300k to 3 million Facebook fans in under 9 months
Building SADI Services Tutorial - SIB Workshop, Geneva, December 2015
Building a Mega Community with PressWork
It’s a WIN, WIN: ‘WordPress On Windows’
Ad

Similar to Tomcat Maven Plugin (20)

PDF
Java Builds with Maven and Ant
PPTX
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014
PPT
Web Applications and Deployment
PPTX
An Introduction to Maven
ODP
Maven from Scratch to Production (.odp)
PPT
PDF
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
PPT
Maven Introduction
PDF
Maven: from Scratch to Production (.pdf)
PDF
Apache Maven In 10 Slides
PPTX
Maven
PPTX
Apache Maven basics
PPTX
Maven 2 Introduction
PDF
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
PPTX
Introduction to Maven
PPT
Juggling Java EE with Enterprise Apache Maven
PDF
Apache maven
PDF
Fundamental of apache maven
PPT
Tomcat Server
Java Builds with Maven and Ant
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014
Web Applications and Deployment
An Introduction to Maven
Maven from Scratch to Production (.odp)
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Maven Introduction
Maven: from Scratch to Production (.pdf)
Apache Maven In 10 Slides
Maven
Apache Maven basics
Maven 2 Introduction
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Introduction to Maven
Juggling Java EE with Enterprise Apache Maven
Apache maven
Fundamental of apache maven
Tomcat Server

Recently uploaded (20)

PPTX
sap open course for s4hana steps from ECC to s4
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Spectroscopy.pptx food analysis technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Empathic Computing: Creating Shared Understanding
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Approach and Philosophy of On baking technology
PPTX
Cloud computing and distributed systems.
sap open course for s4hana steps from ECC to s4
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Mobile App Security Testing_ A Comprehensive Guide.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Dropbox Q2 2025 Financial Results & Investor Presentation
Diabetes mellitus diagnosis method based random forest with bat algorithm
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
Programs and apps: productivity, graphics, security and other tools
Spectroscopy.pptx food analysis technology
MIND Revenue Release Quarter 2 2025 Press Release
Unlocking AI with Model Context Protocol (MCP)
Empathic Computing: Creating Shared Understanding
Agricultural_Statistics_at_a_Glance_2022_0.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Approach and Philosophy of On baking technology
Cloud computing and distributed systems.

Tomcat Maven Plugin

  • 2. © Talend 2011 2 Agenda  Overview and history  What you can do:  Run your war project in an embeded Apache Tomcat within your Apache Maven build  Deploy your war in a running Apache Tomcat instance  Features recently implemented  Questions
  • 3. © Talend 2011 3 /me Olivier Lamy Open Source Architecte @Talend in the Apache Team.  Apache Member : PMC Maven/Archiva, Commons, Tomcat, Incubator : Sqoop, Kalumet, DirectMemory  Jenkins committer  Mojo committer  Etc... (add bugs in various open source projects) Web Ids :  Twitter: twitter.com/olamy  Blog: olamy.blogspot.com
  • 4. © Talend 2011 4 Overview and history Developpement started in Mojo at Codehaus early 2006. For trademark issue move to Apache Tomcat umbrella in 2011. Now developpement at Apache with groupId change to org.apache.tomcat.maven and Mojos renamed to tomcat6 :* with support added of Tomcat7 tomcat7 :*
  • 5. © Talend 2011 5 Running an embeded Apache Tomcat Simply use mvn tomcat*:run to run your Apache Maven war project. No Apache Tomcat to install locally. Maven will download all necessary jars to run an embeded Tomcat. In Maven3 multi modules project, reactors projects automatically added to the webapp classloader : no need to install all jars dependencies. Easy developpement of webapp : no need of restart/install war when modifying jsp/css etc... Debug in your ide with mvnDebug.
  • 6. © Talend 2011 6 Deployment in Apache Tomcat Deploy your Apache Maven project in a running Apache Tomcat instance. Attach the deploy goal to the deploy phase in a profile and your build war will be deploy in a running Tomcat instance. Simple : mvn deploy -Ptdeploy Run the Maven lifecycle (build your war, deploy it to your Repo Man and deploy it to your Tomcat instance)
  • 7. © Talend 2011 7 Executable jar/war Mojo goal to build a standalone jar to run your war. Jar will include your webapps and all necessary Tomcat jars. Cli : mvn tomcat7:exec-war produces a jar my-project-exec-war.jar Simply your project : jar -jar my-project-exec-war.jar Come with some default setup: http port, default server.xml But optionnal cli options : -httpPort -ajpPort etc.. (RTFM :-) )
  • 8. © Talend 2011 8 Maven archetype There is now an archetype : mvn archetype:generate -DarchetypeGroupId=org.apache.tomcat.maven -DarchetypeArtifactId=tomcat-maven-archetype -DarchetypeVersion=2.0-SNAPSHOT Generate a standard multi modules Maven project : * basic-api (service interface) * basic-api-impl (service default impl). * basic-webapp (our webapp module) * basic-webapp-exec (module to generated executable war) * basic-webapp-it (module to run selenium tests with generated war)