You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Bartosz Kowalewski (JIRA)" <ji...@apache.org> on 2010/07/13 21:49:49 UTC

[jira] Commented: (ARIES-299) ensure Aries compiles and runs on Java 5 and Java 6

    [ https://issues.apache.org/jira/browse/ARIES-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887964#action_12887964 ] 

Bartosz Kowalewski commented on ARIES-299:
------------------------------------------

I didn't notice this JIRA when sending an e-mail about JDK5 to aries-dev last month. Let me paste that e-mail here:

Aries projects require Java 1.5 and this requirement is specified in
one of the parent pom.xml files. However, I think that some of the Pax
Exam based tests would not run if pure JDK 1.5 was used. I think that
everybody uses J2SE 1.6 when compiling Aries. It's obvious that you
use up-to-date releases of JDK. The problem is that using JDK 1.6
modifies the was Pax Exam behaves. Specifying source level in Maven is
one thing, but I think that Aries itests should also force using J2SE
1.5 in Pax Exam config. Pax Runner used by Pax Exam chooses different
configuration for the test OSGi container depending on the Java
environment it detects. The J2SE-1.6 profile provides more system
packages than the 1.5 one.

I think that blueprint-annotation-itest project is a good example. If
you run it with Java 1.5, the single Pax Exam test that is available
there will fail. It's because the J2SE-1.5 profile's system packages
do not provide JAXB. Resolution process will fail as there will be no
provider of the javax.xml.bind package.

I think that all itests should explicitly specify the J2SE-1.5 profile
using this option:
rawPaxRunnerOption("--ee", "J2SE-1.5")
All the packages that were available in the 1.6 profile and are not
provided by the 1.5 one (i.e.  javax.xml.bind) should be now provided
by additional (external) bundles that should be added to test
confioguration (where needed).
What are your thoughts on that?

Of course you can add rawPaxRunnerOption("--ee", "J2SE-1.5") to
BlueprintAnnotationTest in blueprint-annotation-itest and see if this
test works when run with Java 1.5 :).

The Pax Runner profiles can be viewed here:
http://codestat.ops4j.org/browse/OPS4J/projects/pax/runner/pax-runner-platform/src/main/resources/META-INF/platform/ee
http://codestat.ops4j.org/browse/OPS4J/projects/pax/runner/pax-runner-platform/src/main/resources/META-INF/platform/ee/JavaSE-1.6.profile?r=13393
http://codestat.ops4j.org/browse/OPS4J/projects/pax/runner/pax-runner-platform/src/main/resources/META-INF/platform/ee/J2SE-1.5.profile?r=13393

> ensure Aries compiles and runs on Java 5 and Java 6
> ---------------------------------------------------
>
>                 Key: ARIES-299
>                 URL: https://issues.apache.org/jira/browse/ARIES-299
>             Project: Aries
>          Issue Type: Bug
>    Affects Versions: 0.2
>            Reporter: Jeremy Hughes
>
> Right now:
> * util: BundleToClassLoaderAdapter needs java 6 libraries in order to compile
> * jndi: the ServiceRegistryContextTest class uses the Wrapper interface which isn't present in java 5
> * transaction: the java.sql.Connection interface introduced new methods using new classes in java 6 so ConnectionWrapper class can't be written to compile on both java 5 and java 6 libraries

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.