New cache plugin requires Servlet API 3.0. Can't compile my plugin project.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

New cache plugin requires Servlet API 3.0. Can't compile my plugin project.

Göran Ehrsson
Hi,

I decided to try out the new cache plugin today (http://grails.org/plugin/cache) in a plugin project using Grails 2.0.4.
But then my plugin project fails to compile:

.../plugins/cache-1.0.0.RC1/src/java/grails/plugin/cache/web/GenericResponseWrapper.java:132: method does not override or implement a method from a supertype
@Override
^

int HttpServletResponseWrapper#getStatus() is new in Servlet API 3.0 so I specified "3.0" in my BuildConfig.groovy
grails.servlet.version = "3.0"

But I still get the same compiler error.

I checked that I don't have the old way of specifying servlet spec in application.properties
I cleaned my project and removed $HOME/.grails/2.0.4/projects/myplugin

Running grails dependency-report shows that servlet-api 2.5 i still used.

1. What am I doing wrong?
2. Was it intentional to require servlet 3.0 by the cache plugin?

Regards

/Goran Ehrsson
Reply | Threaded
Open this post in threaded view
|

Re: New cache plugin requires Servlet API 3.0. Can't compile my plugin project.

burtbeckwith
I'll fix this for the 1.0 final release - for now you should be able to just remove the @Override annotations from the plugin install directory while you're testing.

Burt

Göran Ehrsson wrote
Hi,

I decided to try out the new cache plugin today (http://grails.org/plugin/cache) in a plugin project using Grails 2.0.4.
But then my plugin project fails to compile:

.../plugins/cache-1.0.0.RC1/src/java/grails/plugin/cache/web/GenericResponseWrapper.java:132: method does not override or implement a method from a supertype
        @Override
        ^

int HttpServletResponseWrapper#getStatus() is new in Servlet API 3.0 so I specified "3.0" in my BuildConfig.groovy
grails.servlet.version = "3.0"

But I still get the same compiler error.

I checked that I don't have the old way of specifying servlet spec in application.properties
I cleaned my project and removed $HOME/.grails/2.0.4/projects/myplugin

Running grails dependency-report shows that servlet-api 2.5 i still used.

1. What am I doing wrong?
2. Was it intentional to require servlet 3.0 by the cache plugin?

Regards

/Goran Ehrsson
Reply | Threaded
Open this post in threaded view
|

Re: New cache plugin requires Servlet API 3.0. Can't compile my plugin project.

burtbeckwith
I updated the code and did a snapshot release; change your BuildConfig.groovy entry to

   compile ':cache:1.0.0.BUILD-SNAPSHOT'

to use this build without having to hack the plugin.

Burt
Reply | Threaded
Open this post in threaded view
|

Re: New cache plugin requires Servlet API 3.0. Can't compile my plugin project.

Göran Ehrsson
In reply to this post by Göran Ehrsson
I created a new empty plugin project and added the cache plugin to BuildConfig.groovy

compile ":cache:1.0.0.RC1"

This compiles without problem!?

So it must be something with my plugin. But I can't figure out what it is.
Can plugin dependencies have an effect on servlet api version? My plugin have quite a few plugin dependencies.

/Göran

1 jun 2012 kl. 22:18 skrev Göran Ehrsson:

Hi,

I decided to try out the new cache plugin today (http://grails.org/plugin/cache) in a plugin project using Grails 2.0.4.
But then my plugin project fails to compile:

.../plugins/cache-1.0.0.RC1/src/java/grails/plugin/cache/web/GenericResponseWrapper.java:132: method does not override or implement a method from a supertype
@Override
^

int HttpServletResponseWrapper#getStatus() is new in Servlet API 3.0 so I specified "3.0" in my BuildConfig.groovy
grails.servlet.version = "3.0"

But I still get the same compiler error.

I checked that I don't have the old way of specifying servlet spec in application.properties
I cleaned my project and removed $HOME/.grails/2.0.4/projects/myplugin

Running grails dependency-report shows that servlet-api 2.5 i still used.

1. What am I doing wrong?
2. Was it intentional to require servlet 3.0 by the cache plugin?

Regards

/Goran Ehrsson

Reply | Threaded
Open this post in threaded view
|

Re: New cache plugin requires Servlet API 3.0. Can't compile my plugin project.

Göran Ehrsson
In reply to this post by burtbeckwith
Thanks, that works.

But I'm still confused why my empty plugin project compiles. It compiles even with grails.servlet.version = "2.5"

/Göran

1 jun 2012 kl. 22:21 skrev burtbeckwith:

> I'll fix this for the 1.0 final release - for now you should be able to just
> remove the @Override annotations from the plugin install directory while
> you're testing.
>
> Burt
>
>
> Göran Ehrsson wrote
>>
>> Hi,
>>
>> I decided to try out the new cache plugin today
>> (http://grails.org/plugin/cache) in a plugin project using Grails 2.0.4.
>> But then my plugin project fails to compile:
>>
>> .../plugins/cache-1.0.0.RC1/src/java/grails/plugin/cache/web/GenericResponseWrapper.java:132:
>> method does not override or implement a method from a supertype
>> @Override
>> ^
>>
>> int HttpServletResponseWrapper#getStatus() is new in Servlet API 3.0 so I
>> specified "3.0" in my BuildConfig.groovy
>> grails.servlet.version = "3.0"
>>
>> But I still get the same compiler error.
>>
>> I checked that I don't have the old way of specifying servlet spec in
>> application.properties
>> I cleaned my project and removed $HOME/.grails/2.0.4/projects/myplugin
>>
>> Running grails dependency-report shows that servlet-api 2.5 i still used.
>>
>> 1. What am I doing wrong?
>> 2. Was it intentional to require servlet 3.0 by the cache plugin?
>>
>> Regards
>>
>> /Goran Ehrsson
>>
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/New-cache-plugin-requires-Servlet-API-3-0-Can-t-compile-my-plugin-project-tp4629415p4629416.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: New cache plugin requires Servlet API 3.0. Can't compile my plugin project.

Göran Ehrsson
In reply to this post by burtbeckwith
1.0.0.BUILD-SNAPSHOT works great.

Thanks Burt for the fast feedback!

But I'm still confused about grails.servlet.version. Is that settings used at compile time?

/Göran

1 jun 2012 kl. 22:35 skrev burtbeckwith:

> I updated the code and did a snapshot release; change your BuildConfig.groovy
> entry to
>
>   compile ':cache:1.0.0.BUILD-SNAPSHOT'
>
> to use this build without having to hack the plugin.
>
> Burt
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/New-cache-plugin-requires-Servlet-API-3-0-Can-t-compile-my-plugin-project-tp4629415p4629418.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email