Are there any known problems with the javadoc tool and log4j automatic module?
Running javadoc when having a requires org.apache.logging.log4j fail
as it cannot find the module.
I have done the same as I do for compile, adding all jars on classpath
to the modulepath, then clearing the classpath. Compile works fine.
djviking@machine:~/workspace/movies> /usr/java/jdk-10.0.1/bin/javadoc
--class-path '' --module-path
'/home/djviking/workspace/movies/build/classes/java/main:/home/djviking/workspace/movies/build/resources/main:/home/djviking/.gradle/caches/modules-2/files-2.1/org.controlsfx/controlsfx/9.0.0/8e009b653a2a6eb3336016ad314c040e72395914/controlsfx-9.0.0.jar:/home/djviking/.gradle/caches/modules-2/files-2.1/com.jfoenix/jfoenix/9.0.4/b630dd9c840a8d4610a6f2f38706e21eddfebcd8/jfoenix-9.0.4.jar:/home/djviking/.gradle/caches/modules-2/files-2.1/org.jfxtras/jfxtras-controls/9.0-r1/125ff6b0e22dcd7c9471dd0d849a2f4254b2ad84/jfxtras-controls-9.0-r1.jar:/home/djviking/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-core/2.11.0/e6b751e02120c08702d98750f6a80bc25343b7f5/log4j-core-2.11.0.jar:/home/djviking/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.11.0/bede79a3f150711634a3047985517431bf6499f2/log4j-api-2.11.0.jar:/home/djviking/.gradle/caches/modules-2/files-2.1/com.lmax/disruptor/3.3.7/8549fdcbda5d64db98871e64a4cd0045611686d1/disruptor-3.3.7.jar:/home/djviking/.gradle/caches/modules-2/files-2.1/org.jfxtras/jfxtras-common/9.0-r1/db8dbe26d4a41643e46320a1ec9ac193efc59c64/jfxtras-common-9.0-r1.jar:/home/djviking/.gradle/caches/modules-2/files-2.1/org.jfxtras/jfxtras-fxml/9.0-r1/dfd376482bee9a70532f35f97881a8d7785e1e02/jfxtras-fxml-9.0-r1.jar'
-d '/home/djviking/workspace/movies/build/docs/javadoc' -doctitle
'movies 1.0-SNAPSHOT-SNAPSHOT API' -html5 -verbose -windowtitle
'movies 1.0-SNAPSHOT-SNAPSHOT API'
'/home/djviking/workspace/movies/src/main/java/no/smeaworks/movies/MoviesController.java'
'/home/djviking/workspace/movies/src/main/java/no/smeaworks/movies/MoviesApplication.java'
'/home/djviking/workspace/movies/src/main/java/module-info.java'
Loading source file
/home/djviking/workspace/movies/src/main/java/no/smeaworks/movies/MoviesController.java...
[parsing started
SimpleFileObject[/home/djviking/workspace/movies/src/main/java/no/smeaworks/movies/MoviesController.java]]
[parsing completed 11ms]
Loading source file
/home/djviking/workspace/movies/src/main/java/no/smeaworks/movies/MoviesApplication.java...
[parsing started
SimpleFileObject[/home/djviking/workspace/movies/src/main/java/no/smeaworks/movies/MoviesApplication.java]]
[parsing completed 3ms]
Loading source file
/home/djviking/workspace/movies/src/main/java/module-info.java...
/home/djviking/workspace/movies/src/main/java/module-info.java:18:
error: module not found: org.apache.logging.log4j
requires org.apache.logging.log4j;
^
[parsing started
SimpleFileObject[/home/djviking/workspace/movies/src/main/java/module-info.java]]
[parsing completed 1ms]
[loading /modules/javafx.controls/module-info.class]
[loading /modules/javafx.graphics/module-info.class]
[loading /modules/javafx.base/module-info.class]
[loading /modules/java.desktop/module-info.class]
[loading /modules/java.xml/module-info.class]
[loading /modules/java.base/module-info.class]
[loading /modules/java.datatransfer/module-info.class]
[loading /modules/java.prefs/module-info.class]
[loading /modules/javafx.fxml/module-info.class]
[loading /modules/java.scripting/module-info.class]
[loading /modules/java.logging/module-info.class]
[loading /modules/javafx.web/module-info.class]
[loading /modules/jdk.jsobject/module-info.class]
[loading /modules/jdk.xml.dom/module-info.class]
[loading /modules/javafx.media/module-info.class]
[loading
/home/djviking/.gradle/caches/modules-2/files-2.1/org.jfxtras/jfxtras-controls/9.0-r1/125ff6b0e22dcd7c9471dd0d849a2f4254b2ad84/jfxtras-controls-9.0-r1.jar(/module-info.class)]
[loading
/home/djviking/.gradle/caches/modules-2/files-2.1/org.jfxtras/jfxtras-common/9.0-r1/db8dbe26d4a41643e46320a1ec9ac193efc59c64/jfxtras-common-9.0-r1.jar(/module-info.class)]
[loading
/home/djviking/.gradle/caches/modules-2/files-2.1/org.jfxtras/jfxtras-fxml/9.0-r1/dfd376482bee9a70532f35f97881a8d7785e1e02/jfxtras-fxml-9.0-r1.jar(/module-info.class)]
[loading
/home/djviking/.gradle/caches/modules-2/files-2.1/com.jfoenix/jfoenix/9.0.4/b630dd9c840a8d4610a6f2f38706e21eddfebcd8/jfoenix-9.0.4.jar(/module-info.class)]
[loading /modules/jdk.unsupported/module-info.class]
[done in 322 ms]
1 error
Den tir. 26. jun. 2018 kl. 01:48 skrev Ralph Goers <[email protected]>:
>
> I can’t really answer that. I personally don’t use Eclipse or cradle.
>
> FWIW, we were advised by the Java module team to put module-info.java where
> it is for the reasons you stated.
>
> Ralph
>
> > On Jun 25, 2018, at 12:40 PM, Sverre Moe <[email protected]> wrote:
> >
> > Disregard my final question. Did some research and found out why. It
> > is for backward compatibility. And it is actually implied with your
> > latest sentence also, “earlier versions of Java will ignore it”.
> >
> > Is there a method to get this working with Eclipse and the gradle javadoc
> > task?
> > Den man. 25. jun. 2018 kl. 21:21 skrev Sverre Moe <[email protected]>:
> >>
> >> Running Java 10
> >> Eclipse cannot find the module.
> >>
> >> module no.djviking.movies {
> >> requires org.apache.logging.log4j;
> >> }
> >>
> >> Eclipse: org.apache.logging.log4j cannot be resolved to a module
> >>
> >> Running Eclipse 4.7.3 also on Java 10.
> >>
> >> However building with Gradle works having the module-info in that place.
> >> I had to write the logging code without any Eclipse IDE support.
> >>
> >> However gradle javadoc fails finding the module.
> >>> Task :javadoc FAILED
> >> /home/djviking/workspace/movies/src/main/java/module-info.java:15:
> >> error: module not found: org.apache.logging.log4j
> >>
> >> javadoc {
> >> inputs.property("moduleName", moduleName)
> >> doFirst {
> >> options.addStringOption('-module-path', classpath.asPath)
> >> }
> >> }
> >>
> >>
> >> Why putting it in classes/META-INF/versions/9 ? That approach was
> >> unknown to me. Most modules I have seen have it on the same place as
> >> the package root.
> >>
> >>
> >> Den man. 25. jun. 2018 kl. 20:49 skrev Ralph Goers
> >> <[email protected]>:
> >>>
> >>> I should have said “earlier versions of Java will ignore it”.
> >>>
> >>> Ralph
> >>>
> >>>> On Jun 25, 2018, at 11:44 AM, Ralph Goers <[email protected]>
> >>>> wrote:
> >>>>
> >>>> The module-info.java file is in classes/META-INF/versions/9. Java 9+
> >>>> will find it there. Other versions of Java will ignore it.
> >>>>
> >>>> If you want to look at the source look in
> >>>> https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=blob;f=log4j-api-java9/src/main/java/module-info.java;h=3cb22e02da6fba1475f01d8c17df28d2f89a570d;hb=HEAD
> >>>>
> >>>> <https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=blob;f=log4j-api-java9/src/main/java/module-info.java;h=3cb22e02da6fba1475f01d8c17df28d2f89a570d;hb=HEAD>
> >>>>
> >>>> Ralph
> >>>>
> >>>>> On Jun 25, 2018, at 11:26 AM, Sverre Moe <[email protected]> wrote:
> >>>>>
> >>>>> The only module name that comes up in Eclipse is
> >>>>> org.apache.logging.log4j.core, wirh both log4j-api and log4j-core on
> >>>>> modulepath.
> >>>>>
> >>>>> compile group: 'org.apache.logging.log4j', name: 'log4j-api',
> >>>>> version: '2.11.0'
> >>>>> compile group: 'org.apache.logging.log4j', name: 'log4j-core',
> >>>>> version: '2.11.0'
> >>>>> compile group: 'com.lmax', name: 'disruptor', version:'3.3.7'
> >>>>>
> >>>>> The Log4j-api.jar does not contain a module-info.class
> >>>>> https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-api/2.11.0/log4
> >>>>> j-api-2.11.0.jar
> >>>>>
> >>>>> There is no module-info.java in the Log4j source code
> >>>>> https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=tree;f=log4j-api/src/main/java;h=be0121aff811ff39007e3f89cb05e489326971f0;hb=HEAD
> >>>>>
> >>>>> Should I create a JIRA report for this?
> >>>>> Or is it something I need to do to make this work?
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: [email protected]
> >>>>> For additional commands, e-mail: [email protected]
> >>>>>
> >>>>>
> >>>>
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: [email protected]
> >>> For additional commands, e-mail: [email protected]
> >>>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]