Any particular reason for having a war file per version? Much better
approach would be to version the API classes. That way you could get all
traffic without an explicit version on to the latest available REST API.
You need to embed version info into API classes.

https://developer.github.com/v3/ Github api is a good reference to check.

On Sat, Aug 15, 2015 at 10:17 AM, Sanjeewa Malalgoda <sanje...@wso2.com>
wrote:

> +1 for option 02.
> On Aug 15, 2015 10:01 AM, "Thilini Cooray" <thili...@wso2.com> wrote:
>
>> Hi,
>>
>> We need to version a  webapp which contains RESTful APIs.
>> This webapp will be deployed in WSO2 Api Manager.
>>
>> Following are 3 approaches I found for the purpose :
>>
>>    1. Make war name as <warName>${project.artifactId}-${pom.version}</
>>    warName> which will output webappName-version.war
>>
>>            Its endpoint address is http://HostName:port
>> /webappName-version/
>>            Ex : https://localhost:9443/api-import-export-1.0.0/
>>
>>        2.  Make war name as <warName>${project.artifactId}#${pom.version}
>> </warName> which will output webappName#version.war
>>
>>             This will allow Tomcat server to identify versions of the web
>> app.
>>             Its endpoint address is http://HostName:port/
>> webappName/version/
>>             Ex : https://localhost:9443/api-import-export/1.0.0/
>> <https://localhost:9443/api-import-export-1.0.0/>
>>
>>             WSO2 Application Server follows this approach [1].
>>
>>        3.  Apache tomcat consists of another approach using "##" for
>> context naming [2].
>>             That approach needs to make war name as <warName>
>> ${project.artifactId}##${pom.version}</warName> which will output
>> webappName##version.war
>>
>>            Its endpoint address is http://HostName:port/webappName/
>>            This will use the latest version.
>>            Ex : https://localhost:9443/api-import-export/
>> <https://localhost:9443/api-import-export-1.0.0/>
>>            However this naming convention cannot be deployed in WSO2 Api
>> Manager. It returns AbstractWebappDeployer Unsupported file path format.
>>
>> What is the best approach to follow when versioning the webapp ?
>>
>> [1] https://docs.wso2.com/display/AS521/Webapp+Versioning
>> [2] http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Naming
>>
>> Thanks,
>> ThiliniC.
>>
>> --
>> Best Regards,
>>
>> *Thilini Cooray*
>> Software Engineer
>> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
>> E-mail : thili...@wso2.com
>>
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to