dev@glassfish.java.net

Re: Does the trunk build?

From: Harsha Godugu <Harsha.Godugu_at_Sun.COM>
Date: Mon, 20 Oct 2008 18:42:10 -0700

>
>
> Sahoo wrote:
>> I think I have some idea about why this error occurs. Looking at mvn
>> -X output, I see classpath during compilation of web-glue has
>> servlet-api-2.5.jar ahead of
One of the items that we discussed a long time (3 months or so) ago is,
to strongly discourage the use of *multiple versions* of the same
artifact in a given product. In this case, it happens to be
javax.servlet.ServletContext As you already pointed out, a few of
the v3 modules are using servlet-api-2.5 jar and v3/web is declaring its
own ServletContext api under javax.servlet dir. Under which the
ServletContext interface is enhanced with a new method declaration (with
Amy's checkin). Does this new addition is part of 3.0 servlet api? Or we
have our own flavor of javax.servlet.ServletContext?

If all the other sibling modules depend on a single version of
javax.servlet api, we wouldn't have encountered this problem, at the
first place.
Did someone say, what's wrong with using multiple versions of same
artifact in one product :-)

-hg


>> javax.servlet-3.0-SNAPSHOT.jar. Since this method the compiler is not
>> able to locate is new in Servlet 3.0, compilation fails. More
>> interesting to note that doing a build in web-glue module does not
>> fail, where as doing a build from top level fails. It may just be a
>> bug in maven. For the moment, we can force maven to
>> javax.servlet-3.0-SNAPSHOT.jar ahead in classpath by explicitly
>> specifying a dependency on the same rather than depending on it
>> transitively. See "Dependency mediation" in [1]. I will try this work
>> around and if it works, I shall check in.
>>
>> Thanks,
>> Sahoo
>>
>> [1]
>> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
>>
>>
>> Sahoo wrote:
>>> I am also seeing this error after updating my workspace. I have not
>>> done any investigations yet.
>>>
>>> Thanks,
>>> Sahoo
>>>
>>> Nandini Ektare wrote:
>>>> Hi Amy,
>>>>
>>>> Unfortunately that did not work. I have tried fresh workspace and a
>>>> fresh maven repository (tried specifying new repo explicitly too)
>>>> I have tried both mvn -U install and mvn install (just in case
>>>> dependencies are resolved differently)
>>>>
>>>> Trunk fails with the same error below. Any idea how I could work
>>>> around this issue? (I am on windows if that matters in any way)
>>>>
>>>> Thanks
>>>> Nandini
>>>>
>>>> Amy Roh wrote:
>>>>> The javax.servlet.ServletContext does have the method in
>>>>> question. Try rebuilding after update.
>>>>>
>>>>> Hudson build is fine.
>>>>>
>>>>> Amy
>>>>>
>>>>> Nandini Ektare wrote:
>>>>>> servlet-api module seems incompatible....
>>>>>>
>>>>>> [INFO] [hk2:hk2-compile]
>>>>>> [INFO] Compiling 130 source files to
>>>>>> C:\scf\v3\web\web-glue\target\classes
>>>>>> Note:
>>>>>> C:\scf\v3\web\web-glue\src\main\java\com\sun\enterprise\web\WebComponentInvocation.java
>>>>>> uses or overrides a deprecated API.
>>>>>> Note: Recompile with -Xlint:deprecation for details.
>>>>>> C:\scf\v3\web\web-glue\src\main\java\com\sun\enterprise\web\pwc\connector\coyote\PwcCoyoteRequest.java:146:
>>>>>> cannot find symbol
>>>>>> symbol : method getSessionCookieConfig()
>>>>>> location: interface javax.servlet.ServletContext
>>>>>> (servletContext.getSessionCookieConfig()!=null)) {
>>>>>> ^
>>>>>> Note: Some input files use or override a deprecated API.
>>>>>> Note: Recompile with -Xlint:deprecation for details.
>>>>>> Note: Some input files use unchecked or unsafe operations.
>>>>>> Note: Recompile with -Xlint:unchecked for details.
>>>>>> 1 error
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>> [ERROR] BUILD ERROR
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>> [INFO] Fatal error compiling
>>>>>>
>>>>>> -Nandini
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>>
>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>>
>