Open michielbdejong opened 5 years ago
@acoburn maybe you know?
@michielbdejong in my fork, I had to update a lot of the maven plugin version in order to get the code to build properly with a JDK 9+ environment. I also had to add some missing javadoc fields (@param ..., @return ... and @throws ...
) since the javadoc tool seems to be more strict in the current JDK versions. For this particular error, I'd recommend two steps:
maven-javadoc-plugin
to at least 3.0.0Thanks a lot! Will try that.
So @michielbdejong which option are you going to try!? i.e. 1) Making Aaron's suggested code changes (updating plugins + adding JavaDoc), or 2) Just use Aaron's fork. (I assume the latter!)
And @acoburn, have you submitted a PR to merge your fork back into Master? Or are there reasons for maintaining your fork separately...?
@pmcb55 I have not submitted a PR to merge my changes into this repository because I wanted compiled artifacts that I could use with the TrellisLDP software, especially as part of an automated CI/CD pipeline (e.g. see this repository, particularly the run_ldp_testsuite.sh
script). I was also under the impression that this codebase is, effectively, frozen, but if that is not the case, I can certainly clean up my changes and submit them as a PR.
We want to use ldp-testsuite as one major part of the solid testsuite project. cc @kjetilk
Using the trellis-ldp fork, I still get:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.797 s
[INFO] Finished at: 2019-03-28T13:24:59+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar (attach-javadocs) on project ldp-testsuite: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR]
[ERROR] Command line was: /Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/bin/javadoc @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/Users/michiel/gh/w3c/ldp-testsuite/target/apidocs' dir.
Apart from that small build-time error, java -jar target/ldp-testsuite-0.2.0-SNAPSHOT-shaded.jar --server http://localhost:8000 --basic
does work now, awesome!
I now also notice that in the CI build configuration that I'm using, I exclude the javadoc build stage:
mvn clean install -Dmaven.javadoc.skip
And with that setting, I am also able to run a successful build on JDK 11 and JDK 12.
Update plugin section maven-javadoc-plugin as below:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<use>false</use>
<use>false</use>
<source>1.8</source>
<links><link>http://docs.oracle.com/javase/7/docs/api/</link> <link>http://docs.oracle.com/javase/7/docs/api/</link></links>
<doclint>none</doclint>
</configuration>
</execution>
</executions>
</plugin>
When running
mvn package
with latest master and openjdk12, I see:I tried
mvn package -Dmaven.javadoc.skip=true
but same result. A .jar file is still produced, so I guess it's no big problem, but is there any way to get rid of this error? Use an older Java version, maybe?