dev@glassfish.java.net

Re: Does the trunk build?

From: Sahoo <Sahoo_at_Sun.COM>
Date: Sun, 19 Oct 2008 14:28:24 +0530

I have got a bad news. There appears to be a bug in all versions of
maven upto 2.0.8 which is why even my patch did not fix the problem.
Prior to maven 2.0.9, maven used to use a HashSet as opposed to any kind
of List to store dependencies, as a result the classpath used during
compilation can't be predicted. It has been fixed in 2.0.9. So, we
should probably switch to using 2.0.9 in trunk.

Try using maven 2.0.9 and let us know if the problem goes away.

Thanks,
Sahoo

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 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
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>