DevOps Zone is brought to you in partnership with:

Pascal is a senior JEE Developer and Architect at 4Synergy in The Netherlands. Pascal has been designing and building J2EE applications since 2001. He is particularly interested in Open Source toolstack (Mule, Spring Framework, JBoss) and technologies like Web Services, SOA and Cloud technologies. Specialties: JEE XML Web Services Mule ESB Maven Cloud Technology Pascal is a DZone MVB and is not an employee of DZone and has posted 56 posts at DZone. You can read more from them at their website. View Full User Profile

Deploying the WSO2 CAR File with Maven

  • submit to reddit

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 so I'm posting 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.

Published at DZone with permission of Pascal Alma, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)