logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sverre Moe <sverre....@gmail.com>
Subject Re: Wrong Exports and Automatic Module Name
Date Mon, 25 Jun 2018 19:21:01 GMT
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 <ralph.goers@dslextreme.com>:
>
> I should have said “earlier versions of Java will ignore it”.
>
> Ralph
>
> > On Jun 25, 2018, at 11:44 AM, Ralph Goers <ralph.goers@dslextreme.com> 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 <sverre.moe@gmail.com> 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: log4j-user-unsubscribe@logging.apache.org
> >> For additional commands, e-mail: log4j-user-help@logging.apache.org
> >>
> >>
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message