I did a fork of Ladislav's fork to start looking into what would be
required to move quarkus to the CDI 3.0.0 apis using the jakarta package
name. The initial effort just gets the quarkus/independent-projects/arc
subtree to build and pass its tests. It includes some hacks to alias the
following jakarata ee8 classes:
javax.annotation.Priority
javax.enterprise.inject.Alternative
javax.enterprise.inject.Stereotype
The reason for this is that
the io.quarkus.arc.test.stereotypes.StereotypeAlternativeTest test makes
use of a io.quarkus.test.Mock stereotype that comes from the
quarkus-test-common module, and I did not want to go overboard with a
complete replacement of ee8 to start.
This does bring up the question of how to handle aliasing in general. Right
now the aliases require duplication of the DotNames being checked. Instead
of code like:
if (DotNames.PRIORITY.equals(annotation.name())||
DotNames.PRIORITY_JAVAX.equals(annotation.name())) {
alternativePriority = annotation.value().asInt();
}
One could assign an alias to the DotName:
public static final DotName PRIORITY = create(Priority.class,
"javax.annotation.Priority");
And have the DotName.equals deal with names that have assigned aliases?
My fork:
https://github.com/starksm64/quarkus-fork.git
The PR just to show the diffs:
https://github.com/Ladicek/quarkus-fork/pull/6
Note you have to build/run using the staging profile as many of the jakarta
ee 9 apis only exist in the jakarta nexus staging repo.
*Scotts-iMacPro:arc starksm$ mvn -Pstaging clean verify*
*...*
*[**INFO**] *
*------------------------------------------------------------------------*
*[**INFO**] **Reactor Summary for ArC - Parent pom 999-SNAPSHOT:*
*[**INFO**] *
*[**INFO**] ArC - Parent pom ................................... **SUCCESS**
[ 1.308 s]*
*[**INFO**] CDI Lite Extensions - API .......................... **SUCCESS**
[ 2.606 s]*
*[**INFO**] ArC - Runtime ...................................... **SUCCESS**
[ 1.670 s]*
*[**INFO**] ArC - Processor .................................... **SUCCESS**
[ 3.441 s]*
*[**INFO**] ArC - Tests ........................................ **SUCCESS**
[ 7.037 s]*
*[**INFO**] *
*------------------------------------------------------------------------*
*[**INFO**] **BUILD SUCCESS*
*[**INFO**] *
*------------------------------------------------------------------------*
*[**INFO**] Total time: 16.202 s*
*[**INFO**] Finished at: 2020-09-12T13:29:13-05:00*
*[**INFO**] *
*------------------------------------------------------------------------*