> On Aug 8, 2019, at 4:38 AM, Jean-Louis Monteiro <[email protected]> > wrote: > > 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`
As noted in the other thread, I attempted to turn that into a builder to help: - https://ci.apache.org/builders/tomee-build-jvm8-test-jvm11/builds/0 > > 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) > [...] > > 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? I took a look and we had both the Geronimo JAXB 2.2 and Jakarta JAXB 2.3 APIs in use on different modules so they were both getting sucked in. We also had copies of the corresponding excludes all over the place. Not entirely sure if this is a good idea or not, but we have 400+ excludes across our project, most of them redundant, so I experimented with a way we could reduce them through BOMs: - https://github.com/apache/tomee/tree/master/boms - https://github.com/apache/tomee/blob/master/boms/jaxb-runtime/pom.xml Despite that fanciness, your suggestion to include the JAXB API in the javaee-api jar is probably the best. If we did that and openejb-jee declared a dependency on the runtime, most users could avoid having to add JAXB stuff to their pom as they'd already have both of those. We could potentially delete all the jaxb dependencies in all the examples and see if it really works. Note if we're going to modify the javaee-api jar, I went ahead and did an audit to see what else we might need to change. I posted that in "Java EE 8 versions of APIs" thread. -David
