Hi. Le mar. 25 avr. 2023 à 17:37, Andres Almiray <aalmi...@apache.org> a écrit : > > Hello! > > I'd like to gauge interest in adding a full Java module descriptor (a.k.a > JPMS though the use of the acronym is discouraged) to commons-jexl.
It's an interesting functionality, but I think that it should be done in a general way, applicable to all "Commons" components (through settings/profile in the "parent" POM, I guess). Regards, Gilles > > The codebase is currently Java 8 compatible. Adding a full Java descriptor > requires using Java 9+ in the build but does not force the whole codebase to > migrate. There are a couple of alternatives to make this work: > > - setup Maven so that a secondary source tree containing `module-info-.java` > is compiled with Java 9+. The compiled class should be added to the project's > JAR file inside the versioned space, such as > `/META-INF/versions/9/module-info.class`. > > - use the Moditect[1] Maven plugin to generate `module-info.class` and place > it inside the JAR. > > Full Java modules are required when creating custom Java runtimes with jlink, > regardless of the modular status of the target application. This is the use > case I'm looking for at the moment. > > If interested I can work on a PR based on feedback you may have. > > Cheers, > Andres > > [1] https://github.com/moditect/moditect > > PS: Some metadata of the latest JAR file: > > ``` > $ jarviz bytecode show --gav org.apache.commons:commons-jexl3:3.3 > subject: commons-jexl3-3.3.jar > Unversioned classes. Bytecode version: 52 (Java 8) total: 321 > > $ jarviz module name --gav org.apache.commons:commons-jexl3:3.3 > subject: commons-jexl3-3.3.jar > name: commons.jexl3 > source: filename > automatic: true > valid: true > > $ jarviz bytecode show --gav org.apache.commons:commons-jexl3:3.3 > subject: commons-jexl3-3.3.jar > Unversioned classes. Bytecode version: 52 (Java 8) total: 321 > aalmiray2:tmp aalmiray$ jarviz module descriptor --gav > org.apache.commons:commons-jexl3:3.3 > subject: commons-jexl3-3.3.jar > name: commons.jexl3 > version: 3.3 > open: false > automatic: true > requires: > java.base mandated > provides: > javax.script.ScriptEngineFactory with > org.apache.commons.jexl3.scripting.JexlScriptEngineFactory > contains: > org.apache.commons.jexl3 > org.apache.commons.jexl3.annotations > org.apache.commons.jexl3.internal > org.apache.commons.jexl3.internal.introspection > org.apache.commons.jexl3.introspection > org.apache.commons.jexl3.parser > org.apache.commons.jexl3.scripting > ``` > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org