[ 
https://issues.apache.org/jira/browse/JOHNZON-305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17064229#comment-17064229
 ] 

Adrian Price edited comment on JOHNZON-305 at 3/22/20, 11:27 AM:
-----------------------------------------------------------------

Hi [~romain.manni-bucau], thanks for your response. I've did try modifying the 
build to produce JARs with Automatic-Module-Name manifest headers, but that 
isn't a workable solution, as jlink won't accept automatic modules. Then I 
tried adding module-info.java to johnzon-core but of course that caused 
compilation errors with java-compile.version set to 1.8, but setting it to 9 or 
14 and running the build on JDK14 caused maven-javadoc-plugin to fail because 
some kind of API incompatibility. Other problems surfaced if I disabled the 
javadoc plug-in. So it's clear that making Johnzon properly usable with Java9+ 
will be no easy task, especially if one wishes to retain binary backwards 
compatibility with earlier JRE versions.


was (Author: demonfiddler):
Hi [~romain.manni-bucau], thanks for your response. I've did try modifying the 
build to produce JARs with Automatic-Module-Name manifest headers, but that 
isn't a workable solution, as jlink won't accept automatic modules. Then I 
tried adding module-info.java to johnzon-core but of course that caused 
compilation errors with java-compile.version set to 1.8, but setting it to 9 or 
14 and running the build on JDK14 caused maven-javadoc-plugin to fail because 
some kind of API incompatibility. So it's clear that making Johnzon properly 
usable with Java9+ will be no easy task, especially if one wishes to retain 
binary backwards compatibility with earlier JRE versions.

> Johnzon should provide Java 9 module information
> ------------------------------------------------
>
>                 Key: JOHNZON-305
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-305
>             Project: Johnzon
>          Issue Type: Improvement
>          Components: Core, JAX-RS, JSON-B, Mapper, OSGi, Websocket
>    Affects Versions: 1.2.3
>            Reporter: Adrian Price
>            Priority: Major
>
> Johnzon does not declare any Java 9 modules and consequently it is not usable 
> with a modular Java 9+ program*. There are two possible approaches:
>  # Add module-info.java files to each of johnzon-core, johnzon-jaxrs, 
> johnzon-jsonb, johnzon-json-extras, johnzon-jsonschema, johnzon-mapper, 
> johnzon-osgi, johnzon-websocket and possibly johnzon-maven-plugin. 
> (Preferred, the 'correct way'.)
>  # ConfigureĀ maven-jar-plugin with an 
> archive/manifestEntries/Automatic-Module-Name element. Probably best achieved 
> with a plugin element in the parent /johnzon/pom.xml referencing a property 
> to be defined in each sub-module (say ${johnzon.module.name}). (Quick 'n 
> dirty?)
> I'm not sure, but it might even be appropriate to do both... needs research.
> *You get exceptions like this: 'Unable to make field private final 
> javafx.beans.property.BooleanProperty 
> io.github.demonfiddler.timer.model.MultiTimerBean.delayStart accessible: 
> module io.github.demonfiddler.multitimer does not "opens 
> io.github.demonfiddler.timer.model" to unnamed module @22036d57'. Also 
> Eclipse problem markers like this: "Name of automatic module 'johnzon.core' 
> is unstable, it is derived from the module's file name."



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to