Hi all,

In parallel of the Java 11 TCK on the actual TomEE binary, I looked at the
build again.
Remember that I merged a PR 2 weeks ago and ended up reverting because
TomEE binaries can already work with Java 11.

So here is what I have done so far

1/ Build TomEE with JDK 8
On a terminal with JDK 8, `mvn clean install -DskipTests`

2/ Run tests with JDK 11
Started with the examples first. So in another terminal, I ran `mvn test -f
examples`

It fails pretty much immediately with
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)

That's ok, because as specified in https://openjdk.java.net/jeps/320 JAXB
with some other APIs aren't available anymore.

There is a way to activate javaee modules but it's not recommended as it
will disappear soon. The recommended approach is to add the dependencies
straight in the project as regular dependencies.

In TomEE, the interesting thing is that, the actual binaries shipped to
users (zip, tag.gz) already have those dependencies so TomEE can run on IBM
JVM for instance. That's the reason why I can run TCK with either JDK8 or
JDK11 without any change.

If you check the PR I reverted, I have added the extra dependencies inside
a profile which is activated by default on Java 11. See
https://github.com/apache/tomee/pull/523/files#diff-350f248c5779512fd39778551f6e5ec1R714

What do you guys think?

Should add the APIs straights in the javaee-api?
Add the dependencies straights without profiles?






--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

Reply via email to