Integrating your Maven Build and Tomcat Deployment



Similar documents
MULE PERFORMANCE TEST RESULTS

Migrating Applications From IBM WebSphere to Apache Tomcat

Maven2 Reference. Invoking Maven General Syntax: Prints help debugging output, very useful to diagnose. Creating a new Project (jar) Example:

Sonatype CLM for Maven. Sonatype CLM for Maven

Tcat Server User s Guide. Version 6 R2 December 2009

Cost Savings with Tcat

Builder User Guide. Version Visual Rules Suite - Builder. Bosch Software Innovations

Builder User Guide. Version 5.4. Visual Rules Suite - Builder. Bosch Software Innovations

Sonatype CLM Enforcement Points - Continuous Integration (CI) Sonatype CLM Enforcement Points - Continuous Integration (CI)

Maven or how to automate java builds, tests and version management with open source tools

Content. Development Tools 2(63)

Mobile Labs Plugin for IBM Urban Code Deploy

Hudson configuration manual

TECHNICAL NOTE SETTING UP A STRM UPDATE SERVER. Configuring your Update Server

1 Building, Deploying and Testing DPES application

WEBAPP PATTERN FOR APACHE TOMCAT - USER GUIDE

SOA Software API Gateway Appliance 7.1.x Administration Guide

Oracle Enterprise Manager

Meister Going Beyond Maven

Tool-Assisted Knowledge to HL7 v3 Message Translation (TAMMP) Installation Guide December 23, 2009

The Compatible One Application and Platform Service 1 (COAPS) API User Guide

Extending Remote Desktop for Large Installations. Distributed Package Installs

CORISECIO. Quick Installation Guide Open XML Gateway

INSTALLING AND INVOKING ORACLE DATA INTEGRATOR (ODI) PUBLIC WEB SERVICES

BMC BladeLogic Application Release Automation TECHNICAL WHITE PAPER

Using the IPMI interface

Kaltura Video Plugin for Jive Deployment Guide. Version: 1.0

HELIO Storage Service Developers Guide Draft

An Oracle White Paper September Oracle WebLogic Server 12c on Microsoft Windows Azure

EventTracker: Configuring DLA Extension for AWStats report AWStats Reports

TIBCO Silver Fabric Continuity User s Guide

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Administering Adobe Creative Cloud for Enterprise with the Casper Suite v9.0 or Later. Technical Paper October 2013

Tenable for CyberArk

ios Deployment Simplified FileMaker How To Guide

EventTracker: Configuring DLA Extension for AWStats Report AWStats Reports

IBM WebSphere Partner Gateway V6.2.1 Advanced and Enterprise Editions

Maven2. Configuration and Build Management. Robert Reiz

Using ESB technology as a foundation for BPM

DEPLOYING EMC DOCUMENTUM BUSINESS ACTIVITY MONITOR SERVER ON IBM WEBSPHERE APPLICATION SERVER CLUSTER

ALERT installation setup

Dell Mobile Management. Apple Device Enrollment Program

Specops Command. Installation Guide

Configuring Single Sign-on from the VMware Identity Manager Service to WebEx

Software project management. and. Maven

PRODUCT WHITE PAPER LABEL ARCHIVE. Adding and Configuring Active Directory Users in LABEL ARCHIVE

The 3 Top Challenges for Insurance Firms

XTM Drupal Connector. A Translation Management Tool Plugin

Drupal CMS for marketing sites

NetBeat NAC Version 9.2 Build 4 Release Notes

Monitoring Experience Redefined

Quick Start Guide Using OneDisk with the Tappin Service

3. Installation and Configuration. 3.1 Java Development Kit (JDK)

1 What is Cloud Computing? Cloud Infrastructures OpenStack Amazon EC CAMF Cloud Application Management

Configuring IBM HTTP Server as a Reverse Proxy Server for SAS 9.3 Web Applications Deployed on IBM WebSphere Application Server

Citrix XenServer Workload Balancing Quick Start. Published February Edition

CA Spectrum and CA Service Desk

Installing and Configuring DB2 10, WebSphere Application Server v8 & Maximo Asset Management

Helping Customers Move Workloads into the Cloud. A Guide for Providers of vcloud Powered Services

Administrator s Guide for the Polycom Video Control Application (VCA)

Guide for Generating. Apple Push Notification Service Certificate

Instant Chime for IBM Sametime For IBM Websphere and IBM DB2 Installation Guide

Administration Authentication for InGenius Connector Enterprise

To install Multifront you need to have familiarity with Internet Information Services (IIS), Microsoft.NET Framework and SQL Server 2008.

Oracle Enterprise Manager

TIBCO Spotfire Statistics Services Installation and Administration Guide

Employee Active Directory Self-Service Quick Setup Guide

Application Servers - BEA WebLogic. Installing the Application Server

EMC Documentum Content Services for SAP Repository Manager

Using Group Policy to Remotely Install Steelhead Mobile Software

Usage Tracking for IBM InfoSphere Business Glossary

<Insert Picture Here> Introducing Hudson. Winston Prakash. Click to edit Master subtitle style

An Overview of Samsung KNOX Active Directory-based Single Sign-On

Integrating ConnectWise Service Desk Ticketing with the Cisco OnPlus Portal

Generating an Apple Enterprise MDM Certificate

TIBCO Spotfire Statistics Services Installation and Administration

Using Microsoft Windows Authentication for Microsoft SQL Server Connections in Data Archive

After you have created your text file, see Adding a Log Source.

SSO Plugin. Integration for BMC MyIT and SmartIT. J System Solutions. Version 4.0

Installing and Using the Zimbra Reporting Tool

LabTech Integration Instructions

StreamServe Job Gateway

Active Directory Integration for Greentree

Using Internet or Windows Explorer to Upload Your Site

QuickStart Guide for Mobile Device Management

Configuring Secure Socket Layer (SSL) for use with BPM 7.5.x

Configuring Apache HTTP Server as a Reverse Proxy Server for SAS 9.2 Web Applications Deployed on BEA WebLogic Server 9.2

Embarcadero ToolCloud for XE Quick Start Guide. ToolCloud for Embarcadero XE Products Last Published May 5, 2010

eschoolpad for ipad INSTALLATION GUIDE v3.0 Prepared by: Avrio Solutions Company Limited

Sophos SafeGuard Disk Encryption for Mac and the Casper Suite

DEPLOYING WEBTOP 6.8 ON JBOSS 6.X APPLICATION SERVER

Integrating LivePerson with Salesforce

Implementing a SAS Metadata Server Configuration for Use with SAS Enterprise Guide

Wind River. Intelligent Device Platform XT EMS Profile EMS DEVICE MANAGEMENT USER'S GUIDE WIND RIVER 1.0

AWS CodePipeline. User Guide API Version

QuickStart Guide for Mobile Device Management. Version 8.6

BIRT Application and BIRT Report Deployment Functional Specification

McAfee epolicy Orchestrator Software

Transcription:

Integrating your Maven Build and Tomcat Deployment Maven Publishing Plugin for Tcat Server MuleSource and the MuleSource logo are trademarks of MuleSource Inc. in the United States and/or other countries. All other product and company names and marks mentioned in this document are the property of their respective owners and are mentioned for identification purposes only. All contents Copyright www.mulesoft.com 2008, MuleSource info@mulesoft.com Inc. 1-877-MULE-OSS

Integrating your Maven Build and Tomcat Deployment Overview Apache Tomcat is the world s most widely used application server, with over 1 million downloads per month and over 70% penetration in the enterprise datacenter. Application developers have embraced Tomcat s lightweight simplicity, viewing it as a powerful application platform with none of the cost or complexity of legacy JEE platforms. Apache Maven, a leading open source build automation and project management tool, has also quickly grown in popularity with developers, due to its powerful build automation and dependency management, along with its open source extensibility. Increased use of open source and third party libraries, development teams are finding Maven easier and efficient to use for their builds. The build artifacts produced are often manually copied over to the application container runtime such as Tomcat. There are multiple solutions to automate this process of deploying build artifacts into container runtime. In this paper, we will show how Tcat Server with the Maven Publishing Plug-in dramatically simplifies and automates the build-deploy process, allowing developers to seamlessly publish application builds from Maven directly into Tcat Server s repository, for easy one-click deployment to groups of Tomcat servers. While there are alternative ways of deploying applications to Tomcat directly from Maven, and you do not need to use Tcat Server, the Tcat Server Maven plug-in makes it easy to integrate application deployment as part of your development activities and provides additional diagnostic capabilities for your deployed applications. What is Tcat Server? MuleSoft's Tcat Server is a fully supported Tomcat server that simplifies Tomcat management and application provisioning tasks for administrators. Tcat Server is built on 100% Tomcat, with no changes to the core Tomcat code. Tcat Server includes an in-built repository that can be used to store and version applications, as well as functionality that allows developers to perform one-click provisioning of applications to groups of Tomcat instances. Tcat Server is free for developers to use in their development environments and can be downloaded from http://www.mulesoft.com/. Integrating your Maven Build and Tomcat Deployment 2

Tcat Server s Maven Publishing Plug-in The Maven Publishing Plug-In from MuleSoft allows developers to push web applications built using Maven directly into the Tcat Server repository so that these applications can be deployed to Tomcat. Developers using the plug-in can simply modify the application project s pom.xml file to point to Tcat Server prior to building the project. Maven will automatically push the build directly into the Tcat Server repository, from which the developer can then deploy the application using Tcat Server. Walking Through the Steps For the purpose of illustration, we will use a pom.xml that is built for a sample web application throughout, but you can follow these steps with your own application. Step 1: Create a sample web application If you do not already have a web application that you want to publish to Tcat Server repository, for testing purposes, you can generate a web application stub using mvn. Below is the command to run. (Change mycompany and app names as you would like them to be). mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=mavenarchetype-webapp This will generate the web application stub, and also will generate pom.xml, which you will be modifying in the next step. Step 2: Modify the POM Modify the location details in the Maven pom.xml file to publish the artifact to Tcat Server. There are three modifications that you need to do: The first step is to add the necessary remote plugin repositories to your Maven POM (alternatively, these can also be added to your Maven settings file usually located at ~/.m2/settings.xml). There are 3 remote plugin repositories required MuleForge, Mule Dependencies, and Apache Abdera. Add these to the <pluginrepositories> section so that Maven knows where to get the required files: Integrating your Maven Build and Tomcat Deployment 3

<pluginrepositories> <pluginrepository> <id>muleforge</id> <url>http://repository.muleforge.org</url> <name>muleforge Repository</name> </pluginrepository > <pluginrepository> <id>mule.dependencies</id> <url>http://dist.codehaus.org/mule/dependencies/maven2/</url> <name>mule Dependencies Repository</name> </pluginrepository > <!-- For the Abdera dependencies --> <pluginrepository> <id>apache-incubating</id> <name>apache Incubating Repository</name> <url>http://people.apache.org/repo/m2-incubating-repository/</url> </pluginrepository> </pluginrepositories> The second step is to configure the plug-in. After adding the Maven repositories to the POM, you configure the plug-in as shown in the following example configuration, which publishes the generated WAR from Maven to your Tcat repository (Change the <url> line below to point to your instance of Tcat Server, with the format http://server:port/console/api/registry/applications) <build> <plugins> <plugin> <groupid>org.mule.galaxy</groupid> <artifactid>galaxy-maven-publish-plugin</artifactid> <version>2.0-m4</version> <configuration> <url>http://localhost:8080/console/api/registry/applications</url> <username>admin</username> Integrating your Maven Build and Tomcat Deployment 4

<password>admin</password> <overwrite>true</overwrite>... <!-- Publish generated WAR --> <includes> <include>target/*-${version}.war</include> </includes> </configuration> <executions> <execution> <id>publish-artifacts</id> <phase>package</phase> <goals> <goal>execute</goal> </goals> </execution> </executions> </plugin> Third step is to configure the security information. If you do not want to include the user name and password in your POM as shown above, you can put it in your ~/.m2/settings.xml file. The file will look like this: <settings> <servers> <server> <id>myserver</id> <username>admin</username> <password>admin</password> </server> </servers> </settings> To use this security information in your POM, remove the username and password tags from the POM and add the following tag to your plug-in configuration, replacing myserver with the same ID you used in thesettings.xml file above: <configuration>... <serverid>myserver</serverid> Integrating your Maven Build and Tomcat Deployment 5

... </configuration> Step 3: Build and Upload the Application Now you are ready to build and upload the application to the Tcat Server Repository. NOTE: Make sure that Tcat Server is started prior to executing the next command. Execute the command: mvn package You should see output that looks similar to the following: [INFO] Created artifact <your app>.war (version x.x) [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ At this point the build has been uploaded to the Tcat Server repository. The next steps discuss how to deploy the uploaded application to multiple Tomcat Servers using the Tcat Server console. If you would like to automate this process without logging into Tcat Server console, you can write a simple groovy script in the Tcat Server admin console. For details, please see: http://www.mulesoft.org/display/tcat/scripting+examples. Step 4: Verify the Upload Log into the Tcat Server Console and select the Repository tab. Select Applications, and you should see the application you just uploaded. Integrating your Maven Build and Tomcat Deployment 6

Step 5: Package and Deploy the Application To deploy the application, first add it to an application package that specifies the servers where you want it deployed. On the Deployment tab, click New Package, and then add the application and the servers as shown in the following screen: Click Save and Deploy. The Deployment tab shows that the package has been successfully deployed: Integrating your Maven Build and Tomcat Deployment 7

In Conclusion You should now have uploaded an application and successfully deployed it to at least one server. You can view the ~/webapps directory on your server to verify that the application has been deployed. Using the steps above you can modify any pom.xml file and upload the application to Tcat Server, which then allows you to deploy it to one or more servers. About MuleSoft MuleSoft provides enterprise-class software, support and services for the world's most popular open source application infrastructure products, Mule ESB and Apache Tomcat. With the lightweight and powerful Mule ESB and MuleSoft Tcat Server, MuleSoft is bringing simple yet powerful infrastructure to today's dynamic Web applications. Today, MuleSoft products boast more than 1.5 million downloads and over 2,000 production deployments by leading organizations such as Walmart.com, Nestlé, Honeywell and DHL, as well as 5 of the world s top 10 banks. MuleSoft is headquartered in San Francisco with offices worldwide.. For more information: www.mulesoft.com, or email info@mulesoft.com. Download Tcat Server: http://www.mulesoft.com/download/ MuleSoft and the MuleSoft logo are trademarks of MuleSoft Inc. in the United States and/or other countries. All other product and company names and marks mentioned in this document are the property of their respective owners and are mentioned for identification purposes only. All contents Copyright 2009, MuleSoft Inc. Integrating your Maven Build and Tomcat Deployment 8