using maven with mule

13
Using Maven with Mule Presented By Sindhu VL

Upload: sindhu-vl

Post on 20-Jan-2017

152 views

Category:

Design


0 download

TRANSCRIPT

Page 1: Using maven with mule

Using Maven with Mule

Presented BySindhu VL

Page 2: Using maven with mule

Maven is a project management utility that you can use to develop projects in Mule. Mule provides built-in Maven functionality, including the features listed below.

In Anypoint Studio:Building a Mule application with Maven

in StudioEnabling Maven support for an existing

Studio projectImporting a Maven project into Studio

Page 3: Using maven with mule

In Mule ESB:Maven-Mule ESB functionality is provided

by two Mule plugins for Maven.Maven tools for Mule ESB is a plugin that

provides archetypes for building regular Mule applications, allowing you to develop Mule applications from within Maven

The muleesb-maven-plugin allows you to control Mule ESB instances from within a Maven environment

Page 4: Using maven with mule

Building a Mule Application with Maven in Studio : Build a Simple Project1. Drag an HTTP Connector and a Set Payload

Component into your flow as shown in the figure in next slide.

2. Open the connector’s properties editor and Create a new Conector Configuration element by clicking the green plus sign.

3. Fill in the two required fields: Host and Port. Set the host to localhost and leave the port as the default value 8081 as shown in the figure in next slide.

Page 5: Using maven with mule
Page 6: Using maven with mule

Back in the connecotr’s properties editor, leave the path as the default "/"

Configure the Set Payload component to set the value to "Hello World!", as shown below:

Page 7: Using maven with mule

Now try it out by running your project on the embedded server within Anypoint Studio. Click the project name, then Run As > Mule Application.

Open a browser window and go to http://localhost:8081.

You should see a "Hello World!" message in your browser.

Page 8: Using maven with mule

Enabling Maven Support for a Studio Project :Get existing Mule project that

was already created in Anypoint Studio and add Maven functionality to it.

Maven can make your project more easily shareable with other developers as it takes care of its dependencies and helps automate your project’s build process.

Page 9: Using maven with mule

Mavenizing an Existing Mule Project :

Page 10: Using maven with mule

Studio presents a confirmation dialog, warning that although Maven support can later be disabled, this will not reset your project’s classpath. Click Yes to confirm.

Page 11: Using maven with mule

Importing a Maven Project into Studio  :If you have a Mule project that was built

using http://maven.apache.org/[Maven] outside Anypoint Studio, you can still import it into Studio and continue to work on it with the benefits of the Studio IDE.

Studio has a built-in functionality to import a Maven project.

In Studio, go to File > Import… Select Mule > Maven-based Mule

Project from pom.xml, then click Next.

Page 12: Using maven with mule

Import as shown below :

Page 13: Using maven with mule

ThankYou!!!!