dev@glassfish.java.net

Re: [v3] Can we use JDK 5 to build V3 ?

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Tue, 05 Aug 2008 06:34:07 -0700

Alternatively, we have to use JDK 5 to "build v3". This is very important
for all of us to follow. We can use JDK 6, but only for testing/running
purpose. If you are compiling, you must use JDK 5.

This is because we can run with JRE 6, but don't "require" it. By building
with JDK 6, we can either end up with Major:Minor version of classes that
run only on JRE 6 or create artifacts that depend on JRE-6-only interfaces.
We don't have a global switch somewhere that decides the "target" VM of
the build.

So, please use JDK 5 alone, while building v3. [Again, things do appear to
work when building v3 with JDK 6, but we must not do it].


Sahoo wrote:
> JDK 5 is fine. The error indicates that your code direcctly/indirectly
> depends on StAX (javax.xml.stream), but the pom does not specify it.
> The pom was earlier relying on transitive dependencies to get StAX. We
> changed HK2 to not export its dependencies to others, so that we have a
> chance to ship some other version of StAX. That has caused this problem.
> I checked a change [rev 21581] that fixes the issue.
>
> By the way, why is admingui not part of v3 build? I understand your team
> wants to only build admingui separately, but that does not stop it from
> being part of v3 build.
>
> Thanks,
> Sahoo
>
> Anissa Lam wrote:
>> Hi,
>> Is there new requirement that we need to use Java 6 to build v3 ?
>> I just checked out a fresh workspace and got the following error when
>> building admingui.
>>
>> [INFO] [hk2:hk2-compile]
>> [INFO] Compiling 4 source files to
>> /Users/anilam/Awork/V3/v3-test/v3/admingui/plugin-service/target/classes
>> /Users/anilam/Awork/V3/v3-test/v3/admingui/plugin-service/src/main/java/org/glassfish/admingui/plugin/ConsolePluginService.java:118:
>> cannot access javax.xml.stream.XMLStreamReader
>> file javax/xml/stream/XMLStreamReader.class not found
>> DomDocument doc = parser.parse(url);
>> ^
>> Note:
>> /Users/anilam/Awork/V3/v3-test/v3/admingui/plugin-service/target/apt-generated-sources/org/glassfish/admingui/plugin/ConsoleConfigInjector.java
>> uses unchecked or unsafe operations.
>> Note: Recompile with -Xlint:unchecked for details.
>> 1 error
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Fatal error compiling
>>
>>
>> ConsolePluginService doesn't invoke that api directory, think its
>> through HK2.
>> The HK2 source code uses Java 6 only api's, does it mean we can no
>> longer build on java 5 anymore ? Is this new requirement ? I was
>> able to build on the weekends.
>> I am still running Mac OS 10.4, i hope i don't need to upgrade my OS
>> in order to continue my development since there is no Java 6 on Mac
>> 10.4 yet.
>>
>> thanks
>> Anissa
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>