Deploying the WSO2 CAR file with Maven

To deploy my WSO2 Carbon Application aRchive (CAR) file to my WSO2 ESB instance I use this Maven plugin. I couldn’t find a lot of documentation about it but I post here how I use it. I added the following plugin to my pom.xml file:


I think this plugin is pretty straightforward. As said before I couldn’t find any documentation about it.
The last thing to do to make this work is to create the trustStore file. There are two ways (at least) to get it. The easy way is to get it from the installation directory of the WSO2 ESB. The file is named ‘client-truststore.jks’ and you can find it in the directory ‘$CARBON_HOME/repository/resources/security’. The password is ‘wso2carbon’.
The other way to get it is a little bit harder but I show it anyway. Here we go:

  • Obtain the certificate
  • Open up the management console in Google Chrome (my favorite browser). On the left side of the address bar you see a lock with a cross in it. After you click it you can browse to the certificate information:
    Screen Shot 2013-03-23 at 07.48.42
    When you clicked the link to the certificate information you see the certificate. You can now drag the certificate icon to your desktop so it is saved as file there:
    Screen Shot 2013-03-23 at 07.50.23

  • Create a truststore
  • To create the truststore we need to make a JKS keystore with the certificate in it. There are several ways to do it but I show my favorite tool again, in this case the Keystore Explorer. When you open the tool you can click the option to create a new keystore:
    Screen Shot 2013-03-23 at 07.57.57
    Next step is to import the certificate into the keystore by choosing this menu option:
    Screen Shot 2013-03-23 at 08.00.21
    Now browse to the certificate we just saved on the desktop and select it to import it:
    Screen Shot 2013-03-23 at 08.00.49
    After importing the keystore has one entry:
    Screen Shot 2013-03-23 at 08.01.18
    Now save the store. It will verify you want to trust the certificate and you will have the ability to set the password for the keystore:
    Screen Shot 2013-03-23 at 08.01.50

That is it. We now have a JKS keystore with the certificate in it to which we can point in our Maven plugin configuration.

About Pascal Alma

Pascal is a senior software developer and architect. Pascal has been designing and building applications since 2001. He is particularly interested in Open Source toolstack (Mule, Spring Framework, JBoss) and technologies like Web Services, SOA and Cloud technologies. Lately he is having great fun by building iOS apps with Swift. Specialties: JEE AWS XML/XSD/XSLT Web Services/SOA Mule ESB/ WSO2 ESB Maven Cloud Technology Swift/ iOS
This entry was posted in Maven, Security, WSO2 ESB and tagged , , . Bookmark the permalink.

4 Responses to Deploying the WSO2 CAR file with Maven

  1. surlac says:

    Why you prefer deployment with Maven instead of WSO2 Developer-Studio?

    • Pascal Alma says:

      The main reason is that I am not a big fan of Eclipse tool. I have had some issues with the Developer studio messing up my xml files after editing with the ‘wizard’. So I use the Eclipse tool as least as possible and rather use Maven for the complete chain of compiling/ testing/ packaging and deploying. That way I can use any Java IDE I like (like Netbeans or my favorite: IntelliJ)

Comments are closed.