Testing and Deploying
Deploy CApp to a running server inside EclipseBefore deploy the created CApp project, you have to choose the artifacts you need to deploy. For that, double click on the root-artifact.xml and select artifacts you need to deploy and save the changes.
Go to Servers view, right click and select New -> Server .
Select WSO2 Carbon 3.0 under the catogery of WSO2.
If you have not added WSO2 Server instances before, you will need to specify location of the downloaded WSO2 Server instance.
Now you will see WSO2 Carbon 3.0 is added for Server Runtime Environments. Then click OK.
You can change ports if you want. If the default ports are not used by any other application, you can keep them as they are. After setting the ports click Next.
Add the CApp project and click Finish.
Now you will see newly added server is listed in the Servers view. Right click on the WSO2 Carbon 3.0 at localhost and select Start from the menu.
You will see messages are pop up in the console and when the deployment is done, it will ask to restart the server.
When the server is restarted, you can check whether your CApp project is deployed.
Create Carbon Application Archive (Car) file
There are two ways you can create a .car file. One way is to right click on the CApp project and select Carbon Application Archive [CAR] from the Export menu.
The other way is to select the option from the root-artifact.xml. Open the root-artifact.xml and there is a button to create the Carbon Application Archive [CAR] at the right most top corner.
Then select the artifacts you want to include to the Carbon Application Archive [CAR] and click finish.
Specify the location to save the Carbon Application Archive [CAR] file.
Now you have successfully created a Carbon Application Archive [CAR] file which is ready to be deployed.