[Yanel-dev] Upgrading servlet spec...

Michael Wechner michael.wechner at wyona.com
Wed Apr 2 16:44:15 CEST 2014


Hi

I just tried locally using servlet API 3.0.1, but the build fails when
using for example getStatus(), whereas I noticed that the build
CLASSPATH contains

.m2/repository/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar

ahead of

.m2/repository/javax/servlet/javax.servlet-api/3.0.1/java
x.servlet-api-3.0.1.jar

I will try to get rid of the jetty dependency.

Thanks

Michael

Am 05.03.14 10:13, schrieb Michael Wechner:
> I have cleaned it up so more and only the following "source" files
> inside Yanel contain a reference to servlet-api:
>
> grep -rl servlet-api *
>
> src/build/build.properties
> src/build/dependencies.xml
> src/build/pom-webapp.xml
> src/test/build.xml
>
> whereas build.properties makes sure that no old servlet-api libs are
> being copied and
> src/build/dependencies.xml and src/build/pom-webapp.xml define the
> actual dependency.
>
> Hence only the file src/test/build.xml needs to be modified, such that
> it is referencing yanel-webapp instead servlet-api directly. Will check
> on that later.
>
> Thanks
>
> Michael
>
> Am 05.03.14 09:35, schrieb Michael Wechner:
>> yes backwards compatibility is a major criteria for Yanel and we need to
>> find a way to stick to it
>> as good as possible.
>>
>> I realize we first have to cleanup Yanel itself regarding the
>> servlet-api dependency...At the moment the version is
>> set inside
>>
>> src/build/dependencies.xml
>> src/build/pom-webapp.xml
>>
>> which would actually be sufficient, but it seems that for historical
>> reasons it is still used inside various "resources", e.g.
>>
>> src/build/targets/create-new-resource-type/from-scratch-resource-template/src/build/dependencies-with-javax.xml
>> src/realms/from-scratch-realm-template/res-types/layoutselector/src/build/dependencies.xml
>> src/realms/from-scratch-realm-template/src/build/dependencies.xml
>> src/realms/welcome-admin/src/build/dependencies.xml
>> src/realms/welcome-admin/yanel/resources/show-realms/src/build/dependencies.xml
>> src/realms/yanel-website/src/build/dependencies.xml
>> src/resources/atom/src/build/dependencies.xml
>> src/resources/calendar/src/build/dependencies.xml
>> src/resources/data-repo-sitetree/src/build/dependencies.xml
>> src/resources/davcollection/src/build/dependencies.xml
>> src/resources/image/src/build/dependencies.xml
>> src/resources/lookup/src/build/dependencies.xml
>> src/resources/search/src/build/dependencies.xml
>> src/resources/tinymce/src/build/dependencies.xml
>> src/resources/xinha/src/build/dependencies.xml
>> src/test/build.xml
>> src/realms/from-scratch-realm-template/res-types/layoutselector/src/build/dependencies.xml
>> src/realms/from-scratch-realm-template/src/build/dependencies.xml
>> src/realms/welcome-admin/src/build/dependencies.xml
>> src/realms/welcome-admin/yanel/resources/show-realms/src/build/dependencies.xml
>> src/realms/yanel-website/src/build/dependencies.xml
>> src/resources/atom/src/build/dependencies.xml
>> src/resources/calendar/src/build/dependencies.xml
>> src/resources/data-repo-sitetree/src/build/dependencies.xml
>> src/resources/davcollection/src/build/dependencies.xml
>> src/resources/image/src/build/dependencies.xml
>> src/resources/lookup/src/build/dependencies.xml
>> src/resources/search/src/build/dependencies.xml
>> src/resources/tinymce/src/build/dependencies.xml
>> src/resources/xinha/src/build/dependencies.xml
>> src/test/build.xml
>>
>> so we will first cleanup this and then continue to consider how to best
>> proceed.
>>
>> Thanks
>>
>> Michael
>>
>>
>>
>> Am 04.03.14 17:51, schrieb basZero:
>>> Hi,
>>>
>>> a great idea.
>>> What I would never do is the break official dependencies of Tomcat.
>>> So if you want to use 3.1 servlet spec, you should go with Tomcat 8 (beta).
>>> If you want to go with 3.0 servlet spec, you should go with tomcat 7.
>>> See: http://tomcat.apache.org/whichversion.html
>>>
>>> What concerns backwards compatibility, I only see a solution if the code
>>> gets clearly separated.
>>> I can think of the following approaches:
>>> - Yanel on Tomcat 7 gets created in a new branch (either the current branch
>>> "master" gets forked into a branch called "tomcat6" and the new
>>> tomcat7-version gets commited to master, or you create a new branch called
>>> "tomcat7")
>>> - Maybe it would be better to fully create a new github repository for the
>>> tomcat7 version
>>>
>>> This way you can fully program against the new Servlet API (be it 3.1, 3.0
>>> or the current version in Yanel).
>>>
>>> You could also say that new features of Yanel only go into the latest
>>> version (e.g. tomcat7 branch).
>>> Customers still being on tomcat6 do not have to pay attention to the switch.
>>>
>>> Cheers, Balz
>>>
>>>
>>> On Tue, Mar 4, 2014 at 11:29 AM, Michael Wechner
>>> <michael.wechner at wyona.com>wrote:
>>>
>>>> Hi
>>>>
>>>> I would like to upgrade the servlet spec of Yanel, because Yanel is
>>>> currently using servlet spec 2.3, whereas the most recent version of the
>>>> servlet spec is now 3.1
>>>>
>>>> This would allow us to make use of new interfaces like for example
>>>>
>>>>
>>>> http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletResponse.html#getStatus%28%29
>>>>
>>>> The problem is that I guess many people are using for example older
>>>> Tomcat versions, which do not support the newer servlet spec yet, see
>>>> for example
>>>>
>>>> http://tomcat.apache.org/whichversion.html
>>>>
>>>> Yanel itself includes Tomcat 7.0.25 and we made good experience with it,
>>>> but of course we cannot expect that everyone is using newer Tomcat
>>>> versions.
>>>>
>>>> WDYT?
>>>>
>>>> Michael
>>>> --
>>>> Yanel-development mailing list Yanel-development at wyona.com
>>>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>>>
>>
>>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wyona.org/pipermail/yanel-development/attachments/20140402/b1594140/attachment.html>


More information about the Yanel-development mailing list