commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Herbert <alex.d.herb...@gmail.com>
Subject Re: [rng] Information Pertaining to Running Benchmarks
Date Thu, 16 May 2019 09:03:26 GMT


> On 16 May 2019, at 06:45, Abhishek Dhadwal <dhadwal1507@gmail.com> wrote:
> 
> On Thu, May 9, 2019 at 4:26 AM Alex Herbert <alex.d.herbert@gmail.com>
> wrote:
> 
> 
>> You have to run Maven from the appropriate sub-directory. Your screenshot
>> on Slack shows you are in the top level commons-rng directory:
>> 
>> $ cd commons-rng-examples/examples-jmh
>> $ mvn javadoc:javadoc
>> 
>> That should work.
>> 
>> It did! Thank you !
> 
>> The JMH tutorial requires you to download JMH from its own source
>> repository. They use Mercurial (an alternative source control system from
>> git). This is the ‘hg’ command (Mercury is element Hg) in the list of
>> instructions I sent.
>> 
>> Try running through them step-by-step. It should work as these are the
>> commands that I used to get it running.
>> 
>> Turned out I was building in a wrong directory.
> I changed the directories and tried building the JMH project in order to go
> through the tutorials using mvn clean install. I got a build failure. The
> error report is as follows :
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-javadoc-plugin:3.0.0-M1:jar (attach-javadoc)
> on project jmh-samples: MavenReportException: Error while generating
> Javadoc:
> [ERROR] Exit code: 1 - javadoc: error - The code being documented uses
> modules but the packages defined in
> http://docs.oracle.com/javase/7/docs/api/ are in the unnamed module.
> [ERROR]
> [ERROR] Command line was: "C:\Program
> Files\Java\jdk-11.0.2\bin\javadoc.exe" @options @packages
> [ERROR]
> [ERROR] Refer to the generated Javadoc files in
> 'C:\Users\abhi1\Documents\GitHub\commons-rng\jmh\jmh-samples\target\apidocs'
> dir.

This is due to stricter Java 11 implementation of Javadoc with regard to modules. It is the
same error that prevented you from building the entire RNG project using Java 11. The fix
(for Java 7) requires adding the <source>7</source> tag into the javadoc plugin
of the pom. This is not worth it for just building JMH. I would recommend you install JDK
8 and make it your main java version. It would be rare that you need JDK 11 to build most
software. You do not need it for anything you will do on the commons RNG project.

So for now install JDK 8 and try and run through the JMH tutorials.


Note that although it is possible for commons RNG to make it work under Java 11 to build the
javadoc this then prevents a full build of the site for deployment as one of the plugins does
not handle java 11 source. So commons RNG has to be built with java 9. This is an issue that
may have to be resolved at the time of the next release. This problem with the strictness
of javadoc in Java 11 is scheduled for fix in 11.0.3. All my attempts to make this work are
documented here:

https://github.com/apache/commons-rng/pull/32 <https://github.com/apache/commons-rng/pull/32>


> 
>> Alex
>> 
> Regards,
> Abhishek


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message