com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Deploying a CAR File with the Maven Plug-In

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:

  1. Open the Eclipse instance running WSO2 Developer Studio. 
  2. Click Developer Studio > Open Dashboard to open the Developer Studio Dashboard.
  3. Click ESB Config Project under the Enterprise Service Bus category.
  4. Enter the project name as ESBDeploySample and click Finish.

Create a Proxy Service

  1. Click the ESBDeploySample project in the Project Explorer.

  2. Click Developer Studio > Open Dashboard. Click Proxy Service.

  3. 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

  1. Open the Developer Studio Dashboard and click Composite Application Project under the Distribution category.

  2. Enter the project name as CappSample and click Finish.

  3. 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.

  4. In the Source view of the pom.xml file, add following code snippet under the <plugins> element. (Make sure you add this plugin after the existing entry for maven-eclipse-plugin):

    <plugin>
       <groupId>org.wso2.maven</groupId>
       <artifactId>maven-car-deploy-plugin</artifactId>
       <version>1.0.0</version>
       <extensions>true</extensions>
       <configuration>
        <carbonServers>
         <CarbonServer>
    <trustStorePath>/home/sohani/Desktop/ESB/wso2esb-4.7.0/repository/resources/security/wso2carbon.jks</trustStorePath>
          <trustStorePassword>wso2carbon</trustStorePassword>
          <trustStoreType>JKS</trustStoreType>
          <serverUrl>https://localhost:9443</serverUrl>
          <userName>admin</userName>
          <password>admin</password>
          <operation>deploy</operation>
         </CarbonServer>
        </carbonServers>
       </configuration>
    </plugin>
    Give the actual location of the wso2carbon.jks file at the <trustStorePath> element ($ESB_HOME/repository/resources/security/wso2carbon.jks).
  5. Save your changes.

Deploy CAR file to the WSO2 ESB server

  1. Start the WSO2 ESB server in your machine.

  2. Build the ESBDeploySample project using the mvn clean install command.

  3. Build the CappSample project using the commands listed below.

Enable the deployment of the CAR file to the Carbon Server by doing one of the following,

  • Add <maven.car.deploy.skip>false</maven.car.deploy.skip> to the properties section of the C-App project's pom.xml file
  • Provide -Dmaven.deploy.skip=true -Dmaven.car.deploy.skip=false with the mvn clean deploy command.  E.g: mvn clean deploy -Dmaven.deploy.skip=true -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 below:

If you want to disable the deployment of the CAR file to the Carbon Server, you can do one of the following:

  • Add <maven.car.deploy.skip>true</maven.car.deploy.skip> to the properties section of the C-App project's pom.xml file
  • Provide -Dmaven.car.deploy.skip=true with the mvn clean deploy command.  E.g: mvn clean deploy -Dmaven.car.deploy.skip=true

If you want to undeploy the deployment of the CAR file to the Carbon Server, 

Provide -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

For complete information on deployment options, see Generating and deploying the CAR file.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.