Deploying the WSO2 CAR File with Maven
Join the DZone community and get the full member experience.
Join For Free
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:
<plugin> <groupid>org.wso2.maven</groupid> <artifactid>maven-car-deploy-plugin</artifactid> <version>1.0.0</version> <extensions>true</extensions> <configuration> <carbonservers> <carbonserver> <truststorepath>${basedir}/src/main/resources/security/wso2-localhost.jks</truststorepath> <truststorepassword>wso2</truststorepassword> <truststoretype>jks</truststoretype>--> <serverurl>https://localhost:9443</serverurl> <username>admin</username> <password>admin</password> <operation>deploy</operation> </carbonserver> </carbonservers> </configuration> </plugin>
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
- create a truststore
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:
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:
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:
next step is to import the certificate into the keystore by choosing this menu option:
now browse to the certificate we just saved on the desktop and select it to import it:
after importing the keystore has one entry:
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:
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 $$anonymous$$. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
From On-Prem to SaaS
-
Auditing Tools for Kubernetes
-
Top 10 Engineering KPIs Technical Leaders Should Know
-
SRE vs. DevOps
Comments