Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[glassfish-dev] Incremental conversion to org.jakarta - yes, it is possible.

I’m feeling foolish for not having thought of this earlier, but of course there is a way to do it.

Take a look at the shading branch of orb-gmbal-pfl. I have used the maven shade plugin to create a temporary dependency jar in which the relevant org.javax dependencies (those not in the JDK itself) have been relocated automatically to org.jakarta. This allows me to have the code use that hierarchy in its imports. We can do this top-down, starting with Glassfish, and relocating all relevant dependencies. As those dependent projects are themselves updated to the new hierarchy, we can then pick them up. That means that we don’t ever need to have any of the projects broken. We can even convert the various modules in Glassfish itself incrementally. 

To do this, I have:
(1) added a shaded dependency jar whose sole purpose is to contain the auto-relocated versions of all as-yet-unconverted projects
(2) for each module, added a dependency to the new shaded jar and changed the imports to refer to the new path.

That’s pretty simple, I’d say.

- Russ

Back to the top