Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Like this? Share it with your network

Share

Tomcat Maven Plugin

on

  • 3,000 views

updated version

updated version

Statistics

Views

Total Views
3,000
Views on SlideShare
2,996
Embed Views
4

Actions

Likes
1
Downloads
15
Comments
0

2 Embeds 4

http://www.linkedin.com 2
https://www.linkedin.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Tomcat Maven Plugin Presentation Transcript

  • 1. Apache Tomcat Maven Plugin
  • 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 2
  • 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 3
  • 4. Overview and historyDeveloppement 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 4
  • 5. Running an embeded Apache TomcatSimply 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 5
  • 6. Deployment in Apache TomcatDeploy 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 -PtdeployRun the Maven lifecycle (build your war, deploy it to your Repo Man and deploy it to your Tomcat instance)© Talend 2011 6
  • 7. Executable jar/warMojo 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.jarSimply your project : jar -jar my-project-exec-war.jarCome with some default setup: http port, default server.xmlBut optionnal cli options : -httpPort -ajpPort etc.. (RTFM :-) )© Talend 2011 7
  • 8. Maven archetypeThere is now an archetype :mvn archetype:generate -DarchetypeGroupId=org.apache.tomcat.maven -DarchetypeArtifactId=tomcat-maven-archetype -DarchetypeVersion=2.0-SNAPSHOTGenerate 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)© Talend 2011 8
  • 9. Merci !Questions ?