> On 3 Nov 2019, at 20:12, Alex Herbert <alex.d.herb...@gmail.com> wrote:
> 
> 
> 
>> On 3 Nov 2019, at 19:30, Gary Gregory <garydgreg...@gmail.com 
>> <mailto:garydgreg...@gmail.com>> wrote:
>> 
>> On Sun, Nov 3, 2019 at 10:01 AM Alex Herbert <alex.d.herb...@gmail.com 
>> <mailto:alex.d.herb...@gmail.com>>
>> wrote:
>> 
>>> I think everything is finalised for a release of RNG, namely:
>>> 
>>> All bugs and issues with SonarCloud and LGTM.com <http://lgtm.com/> are 
>>> fixed.
>>> The user guide has been updated for all the new features.
>>> The performance and quality results have been updated in the user guide.
>>> 
>>> Any objections to me cutting a release candidate for v1.3? I hope to get
>>> it done next week.
>>> 
>> 
>> You first should make sure binary compatibility is there, Apache RAT check
>> passes, and so on. That will avoid possible issues in a RC.
> 
> rat:check and clirr:check are part of the default maven build so errors 
> should not enter the codebase.
> 
> The clirr:clirr report is full of infos for all the new API methods and 
> classes.
> 
> I'll start with a release dry run and see how everything looks.
> 
> The only outstanding “issue” is that the full code for release has to be 
> built using JDK 9. 
> 
> The extra examples maven modules contains some code using Java 9 modules. All 
> my attempts to get a build to work with JDK 11 have failed on the javadoc 
> tool which complains about building for code using modules that references 
> packages in the named module [1]. My last attempt using JDK 11.0.4 had the 
> same error I found with JDK 11.0.2. I have not a found a fix for a 
> multi-module Maven project that uses different java source versions and 
> includes some java 9 source explicitly using modules.
> 
> Given that JDK 11.0.5 is out I will have another look at this. A brief scan 
> of the release notes for 11.0.5 does not mention anything but it is worth a 
> try. I’d rather do a release using JDK 11 than JDK 9.

JDK 11 works depending on the vendor and the source version!

Steps

1. Optional. Update commons-rng-examples/examples-jpms/pom.xml to changes the 
source and target from 9 to 11. This is:

    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.release>11</maven.compiler.release>

2. Build using: mvn clean package site site:stage -P commons-rng-examples


Tested two JDK 11 distributions:

Official JDK from https://jdk.java.net/java-se-ri/11 
<https://jdk.java.net/java-se-ri/11>

java -version
java version "11.0.5" 2019-10-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.5+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.5+10-LTS, mixed mode)

OpenAdopt JDK 
https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot#x64_linux
 
<https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot#x64_linux>

java -version
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.5+10, mixed mode)


I tried 4 variants:

Source 9, JDK 11.0.5
Source 9, OpenAdopt JDK 11.0.5
Source 11, JDK 11.0.5
Source 11, OpenAdopt JDK 11.0.5


Source 9, JDK 11.0.5

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-site-plugin:3.8.2:site (default-site) on project 
commons-rng-examples-jpms-lib: Error generating 
maven-javadoc-plugin:3.1.1:javadoc report: 
[ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules 
but the packages defined in https://docs.oracle.com/javase/9/docs/api/ are in 
the unnamed module.
[ERROR] javadoc: error - The code being documented uses modules but the 
packages defined in 
https://commons.apache.org/proper/commons-rng/commons-rng-client-api/apidocs/ 
are in the unnamed module.
[ERROR] javadoc: error - The code being documented uses modules but the 
packages defined in 
https://commons.apache.org/proper/commons-rng/commons-rng-sampling/apidocs/ are 
in the unnamed module.

Source 9, OpenAdopt JDK 11.0.5

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-site-plugin:3.8.2:site (default-site) on project 
commons-rng-examples-jpms-lib: Error generating 
maven-javadoc-plugin:3.1.1:javadoc report: 
[ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules 
but the packages defined in https://docs.oracle.com/javase/9/docs/api/ are in 
the unnamed module.


Source 11, JDK 11.0.5

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-site-plugin:3.8.2:site (default-site) on project 
commons-rng-examples-jpms-lib: Error generating 
maven-javadoc-plugin:3.1.1:javadoc report: 
[ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules 
but the packages defined in 
https://commons.apache.org/proper/commons-rng/commons-rng-client-api/apidocs/ 
are in the unnamed module.
[ERROR] javadoc: error - The code being documented uses modules but the 
packages defined in 
https://commons.apache.org/proper/commons-rng/commons-rng-sampling/apidocs/ are 
in the unnamed module.


Source 11, OpenAdopt JDK 11.0.5

OK



So there are at least two options:

1. Release using JDK 9
2. Update the examples project to use source 11 for the Java modules code and 
release using a non-oracle JDK 11

Note that updating to use source 11 will break the Jenkins build which uses JDK 
9 to run a full build including the -P commons-rng-examples profile. This could 
be ignored, updated to JDK 11 or dropped in favour of adding an appropriate JDK 
11 run using Travis.

Another option is to somehow get around the javadoc issue with modules and 
unnamed modules.

WDYT?

Alex


> 
> Alex
> 
> 
> [1] https://github.com/apache/commons-rng/pull/32 
> <https://github.com/apache/commons-rng/pull/32>
>> 
>> Gary
>> 
>> 
>>> 
>>> Alex
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org 
>>> <mailto:dev-unsubscr...@commons.apache.org>
>>> For additional commands, e-mail: dev-h...@commons.apache.org 
>>> <mailto:dev-h...@commons.apache.org>

Reply via email to