Testing and Deploying

Content

Deploy C-App to a running server inside Eclipse

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



New Server Runtime



Go to Servers view, right click and select New -> Server .





New Server Runtime



Select WSO2 Carbon 3.0 under the catogery of WSO2.





New Server Runtime



If you have not added WSO2 Server instances before, you will need to specify location of the downloaded WSO2 Server instance.





New Server Runtime



Now you will see WSO2 Carbon 3.0 is added for Server Runtime Environments. Then click OK.





New Server Runtime



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.





New Server Runtime



Add the CApp project and click Finish.





New Server Runtime



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.





New Server Runtime



You will see messages are pop up in the console and when the deployment is done, it will ask to restart the server.





New Server Runtime







New Server Runtime



When the server is restarted, you can check whether your CApp project is deployed.





New Server Runtime



Redeploy an already deployed C-App to a running server inside Eclipse

After you have deployed your C-App to a running server inside Eclipse, you may want to change the content of your C-App. In that case you do not need to remove the deployed C-App from the server and deploy again to the server. Instead you can redeploy an already deployed C-App.





Deploy the C-App project according to the instructions given above and then do the necessary changes to your C-App project.





Open the Servers view in Eclipse using Window => Show View => Servers.





Click on the expandable icon of the Server you are running inside Eclipse. (This expandble icons available only if you have deployed a project in that server)





Right click on the project and Select Redeploy option from the popup menu.





Redeploy C-App project.



Then you will see that your Eclipse console is updated and you can notice that your C-App project is deployed again.





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.





New Server Runtime



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.





New Server Runtime



Then select the artifacts you want to include to the Carbon Application Archive [CAR] and click finish.





New Server Runtime



Specify the location to save the Carbon Application Archive [CAR] file.





New Server Runtime



Now you have successfully created a Carbon Application Archive [CAR] file which is ready to be deployed.