Search code examples
apache-axiswar

What is the difference between aar and war file?


I don't know what are aar archive files and how they differ from war. I read that they are somewhat convertible. When to use which one? What are pros and cons and limitations.


Solution

  • A .war is a web archive that you can deploy to any Java EE application server.

    A .aar is a specific axis2 artifact that you can deploy in an application server where you have Axis2 standard web application deployed already.

    You can still deploy an Axis2 application, including multiple services, in a standard web application, using the 'embedded' mode, as described here: http://wso2.com/library/90. Converting from .aar mode to embedded mode consists of extracting all files and carefully putting them in the right place for the embedded mode.

    Pro's for the .aar is the hot deployment as @renat-gilmanov answered.

    Pro's for the .war (embedded) is

    1. easier to deploy and manage in a production environment: just deploy one .war on any application server instead of having to follow a complex deployment procedure.
    2. you can include more servlets in the same .war, such as e.g. the client application.