aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bartosz Kowalewski <kowalewski.bart...@gmail.com>
Subject Various Aries itests projects, J2SE 1.5 and Pax Runner profiles
Date Fri, 25 Jun 2010 22:20:00 GMT
Hi All,

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 availabale
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

Best regards,
  Bartek

Mime
View raw message