This page walks you through how to deploy a CAR file containing ESB artifacts using the Maven plug-in. It includes the following sections:
This sample refers to the following products and their versions:
WSO2 ESB - 4.7.0 and 4.8.1
WSO2 Developer Studio - 3.2.0
Create an ESB Config Project
Follow the steps below to create an ESB config project:
- Open the Eclipse instance running WSO2 Developer Studio.
- Click Developer Studio > Open Dashboard to open the Developer Studio Dashboard.
- Click ESB Config Project under the Enterprise Service Bus category.
- Enter the project name as ESBDeploySample and click Finish.
Create a Proxy Service
Click the ESBDeploySample project in the Project Explorer.
Click Developer Studio > Open Dashboard. Click Proxy Service.
Enter the proxy service name as ProxySample.
Now you have a simple proxy service that you can deploy to WSO2 ESB.
Create a Composite Application Project
Open the Developer Studio Dashboard and click Composite Application Project under the Distribution category.
Enter the project name as CappSample and click Finish.
Open the pom.xml file of the CappSample project and select the check box for the ESBDeploySample project to add it to the C-App.
In the Source view of the
pom.xmlfile, add following code snippet under the
<plugins>element. (Make sure you add this plugin after the existing entry for maven-eclipse-plugin):Give the actual location of the
wso2carbon.jksfile at the
- Save your changes.
Deploy CAR file to the WSO2 ESB server
Start the WSO2 ESB server in your machine.
Build the ESBDeploySample project using the
mvn clean installcommand.
Build the CappSample project using the commands listed below.
In order to enable the deployment of a CAR file to a Carbon Server, you can do one of the following,
<maven.car.deploy.skip>false</maven.car.deploy.skip>to the properties section of the C-App project's
-Dmaven.car.deploy.skip=falsewith the mvn clean deploy command. E.g:
mvn clean deploy -Dmaven.car.deploy.skip=false
After building the project, you can see that the ProxySample proxy service has been deployed to the sever as shown in the figure below:
In order to disable the deployment of a CAR file to a Carbon Server, you can do one of the following:
<maven.car.deploy.skip>true</maven.car.deploy.skip>to the properties section of the C-App project's
-Dmaven.car.deploy.skip=truewith the mvn clean deploy command. E.g:
mvn clean deploy -Dmaven.car.deploy.skip=true
In order to undeploy the deployment of a CAR file to a Carbon Server,
-Doperation=undeploy -Dmaven.deploy.skip=true -Dmaven.car.deploy.skip=false with the mvn clean deploy command. E.g:
mvn clean deploy -Doperation=undeploy -Dmaven.deploy.skip=true -Dmaven.car.deploy.skip=false