smallrye / jandex

Java Annotation Indexer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Experiment with Multi-Module Multi-JVM setup

n1hility opened this issue · comments

Jandex needs to be built and distributed on an older JVM than the bytecode it can read and needs to be tested with. Explore some form of setup where the test data classes (potentially including the tests if required) are in a separate module with a more recent JVM, the main jandex jar itself.

Also consider pulling in the maven plugin as a module

#101 is basically the same thing.

The Jandex Maven plugin is GPL licensed, and the typeannotation-test artifact seems to be LGPL licensed (per the header in the POM). Jandex itself is Apache 2.0 licensed, and to merge these projects in, I'd really like them relicensed. Most contributors to these projects are Red Hatters, so we don't need their agreement, but there's a couple community contributors where I, not being a lawyer :-), don't feel like declaring their contribution as trivial. Let's collect their agreements here.

I agree!

I agree to relicense my work to Apache 2.0 license

Thanks a lot @famod @hboutemy!

I was able to do this with a little trick. There's a Maven plugin (called mvn-jlink-wrapper) that can download and unzip a JDK from AdoptOpenJDK. The Maven Compiler plugin can fork off a javac process from given location. The Maven JAR plugin needs extra care, because it tries to be smart in presence of module-info.class. I used all these 3 items on the typeannotation-test module and it becomes completely self-contained, built by JDK 16 even if Maven is executed with JDK 8.

I'll push a branch with all this, as well as moving to SmallRye coordinates and SmallRye parent POM, as this can't be brought in via PR. All subsequent changes will come in as PRs to the smallrye branch. That allows working on the 3.0 release while still keeping master on 2.4. Transferring the project to the SmallRye org should probably happen later on, when 3.0 is ready for release.

This is now done on the smallrye branch.