Skip to content

Transformer ‐ for bundle transforming to run in different environments

Gordon Hutchison edited this page Oct 11, 2023 · 10 revisions

There are a few 'transformers' in the OpenLiberty project, this page is portal for the use of the Eclipse transformer project's tooling used, for example, to do JavaEE to Jakarta transformation of projects/bundles.

Jakarta

See JakartaEE Transformation Rules Wiki Page

To allow transformed jars to be on the bnd buildpath when building EE9+ projects, see cnf/build.bnd

Beta and Non-Beta

Customer Projects

https://openliberty.io/blog/2021/03/17/eclipse-transformer.html

FAT projects

https://github.com/OpenLiberty/open-liberty/blob/integration/dev/fattest.simplicity/src/componenttest/rules/repeater/JakartaEE9Action.java#L204

Wiki on Repeat Actions: https://github.com/OpenLiberty/open-liberty/wiki/FAT-tests#repeating-fat-tests-for-different-featurejee-levels

Gradle Tasks

https://github.com/OpenLiberty/open-liberty/blob/integration/dev/wlp-gradle/subprojects/tasks.gradle

Other Links

https://github.com/OpenLiberty/open-liberty/blob/580c0073eb209938841144866526249aad84cacf/dev/wlp-jakartaee-transform/notes.txt https://github.com/eclipse/transformer/wiki

FAQ

  • Q: If my tests are now using javax instead of jakarta packages, should I expect the tests repeated by .andWith(FeatureReplacementAction.BETA_OPTION().fullFATOnly()); to fail? I am getting errors like these: Caused by: java.lang.NoClassDefFoundError: javax.enterprise.inject.spi.CDI If so, what do I need to do to get the BETA_OPTION() action to convert the javax packages to jakarta ones?
  • A: You would need to do that with a EE 9 or 10 repeat like: .andWith(FeatureReplacementAction.EE10_FEATURES().withBeta().fullFATOnly())