I did some experiments with integrating Eclipse Transformer into
Jenkins core and the Maven HPI plugin. It seems to work pretty well: I
have not seen any false positives yet, and almost all plugins
converted by it seem to work OK in a Jakarta EE 9 environment. I am
starting to think that any Jakarta EE 9 migration strategy will need
to include Eclipse Transformer or a similar tool at some level.

One relatively low-risk way to start using Eclipse Transformer is to
scan a directory of sources and/or binaries for Java EE references. I
tried this from within the Maven HPI plugin and it seems to work fine,
exempli gratia, it found references in Email Extension (to JavaMail)
but not Pipeline: Job (modulo JSR 305 nullability annotations, which
we ought to convert to SpotBugs annotations anyway). We might want to
start incorporating Eclipse Transformer scans into existing builds and
marking those plugins without Java EE references with something like
"Jakarta-Ready: true" in MANIFEST.MF. That way, in the future we will
know that when loading those plugins in a Jakarta EE 9 environment we
will not need to do any special compatibility transformations.

When loading plugins without "Jakarta-Ready: true" in a Jakarta EE 9
environment, we will probably need to apply some special compatibility
transformations, exempli gratia, transforming the binaries after
exploding the plugin or loading the plugin in a special class loader
that transforms the classes as they are loaded. I have prototyped the
former; the latter seems more challenging.

Once a public release of a Jakarta EE 9 environment is available and
plugins update their core baseline to it (which would necessitate
changing any Java EE package imports that come from core to Jakarta EE
9 package imports), plugins might still pull in Java EE dependencies
and package them in the war. The scanning done at build time by
Eclipse Transformer in the Maven HPI plugin could detect this and
issue warnings with recommendations to switch libraries, upon which
the plugin would automatically become "Jakarta-Ready: true".

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAFwNDjpqO-%2BsD6Wk3Cz2vTEr86F34oL29i06oX6X3_HriYuZ8g%40mail.gmail.com.

Reply via email to