Re: Wrong Exports and Automatic Module Name

2018-08-10 Thread Sverre Moe
Den fre. 10. aug. 2018 kl. 04:40 skrev Ralph Goers <
ralph.go...@dslextreme.com>:

> Is this related to
> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8208269? <
> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8208269?>
>
> Ralph
>
> Thanks for letting me know. I hope it will be fixed soon. It should have
been fixed before JDK 11 is finished since it is the LTS of Java 9 Modules.

/Sverre


Re: Wrong Exports and Automatic Module Name

2018-08-09 Thread Ralph Goers
Is this related to 
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8208269? 


Ralph

> On Aug 9, 2018, at 2:08 PM, Sverre Moe  wrote:
> 
> still no solution
> 
> I have even tried with latest snapshots of JDK 11 and JDK 12, same problem.
> 
> Den tor. 28. jun. 2018 kl. 00:07 skrev Sverre Moe :
> 
>> 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
>> 

Re: Wrong Exports and Automatic Module Name

2018-08-09 Thread Sverre Moe
still no solution

I have even tried with latest snapshots of JDK 11 and JDK 12, same problem.

Den tor. 28. jun. 2018 kl. 00:07 skrev Sverre Moe :

> 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 <
> ralph.go...@dslextreme.com>:
> >
> > I can’t really answer that. I personally 

Re: Wrong Exports and Automatic Module Name

2018-06-27 Thread Sverre Moe
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 :
>
> 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  wrote:
> >
> > Disregard my final question. Did some research and found out why. It
> > is for backward compatibility. 

Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Ralph Goers
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  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 :
>> 
>> 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 
>> :
>>> 
>>> I should have said “earlier versions of Java will ignore it”.
>>> 
>>> Ralph
>>> 
 On Jun 25, 2018, at 11:44 AM, Ralph Goers  
 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
  
 
 
 Ralph
 
> On Jun 25, 2018, at 11:26 AM, Sverre Moe  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-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 
 
>>> 
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>>> 
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 



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



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Sverre Moe
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 :
>
> 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 
> :
> >
> > I should have said “earlier versions of Java will ignore it”.
> >
> > Ralph
> >
> > > On Jun 25, 2018, at 11:44 AM, Ralph Goers  
> > > 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
> > >  
> > > 
> > >
> > > Ralph
> > >
> > >> On Jun 25, 2018, at 11:26 AM, Sverre Moe  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-unsubscr...@logging.apache.org
> > >> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> > >>
> > >>
> > >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >

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



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Sverre Moe
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 :
>
> I should have said “earlier versions of Java will ignore it”.
>
> Ralph
>
> > On Jun 25, 2018, at 11:44 AM, Ralph Goers  
> > 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
> >  
> > 
> >
> > Ralph
> >
> >> On Jun 25, 2018, at 11:26 AM, Sverre Moe  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-unsubscr...@logging.apache.org
> >> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >>
> >>
> >
>
>
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>

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



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Ralph Goers
I should have said “earlier versions of Java will ignore it”.

Ralph

> On Jun 25, 2018, at 11:44 AM, Ralph Goers  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
>  
> 
> 
> Ralph
> 
>> On Jun 25, 2018, at 11:26 AM, Sverre Moe  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-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>> 
>> 
> 



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



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Sverre Moe
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-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Ralph Goers
Log4j-API is not an automatic module. It has a module-info.java file.

Log4j-API does not “require” log4j-core. It’s module-info specification is

exports org.apache.logging.log4j;
exports org.apache.logging.log4j.message;
exports org.apache.logging.log4j.simple;
exports org.apache.logging.log4j.spi;
exports org.apache.logging.log4j.status;
exports org.apache.logging.log4j.util;

uses org.apache.logging.log4j.spi.Provider;
uses org.apache.logging.log4j.util.PropertySource;
uses org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory;

Log4j-core IS an automatic module with a name of org.apache.logging.log4j.core. 
It cannot be a “real” module because it has dependencies on libraries that have 
not declared themselves to be Java 9 modules, automatic or otherwise. 
Therefore, it cannot declare that it provides the three items log4j-api says it 
needs for an implementation to provide.

That said, we do have tests that pass and other users have pointed out problems 
in the module-info.java that, once fixed, seemed to have made things work for 
them.

Ralph


> On Jun 23, 2018, at 5:00 AM, Sverre Moe  wrote:
> 
> Apache Log4j may have a wrong Automatic-Module-Name
> requires org.apache.logging.log4j.core;
> 
> I cannot use the Logger and LogManager classes because they are not
> accessible to my module.
> 
> import org.apache.logging.log4j.LogManager;
> import org.apache.logging.log4j.Logger;
> private Logger logger = LogManager.getLogger(this.getClass());
> 
> The type org.apache.logging.log4j.LogManager is not accessible
> The type org.apache.logging.log4j.Logger is not accessible
> 
>> "This is the central interface in the log4j package. Most logging 
>> operations, except configuration, are done through this interface. The 
>> canonical way to obtain a Logger for a class is through {@link 
>> LogManager#getLogger()}."
> 
> The Logger implementation is accessible:
> import org.apache.logging.log4j.core.Logger;
> 
> It seems to me that the classes in core package is not to be accessed
> directly by those using Log4j.
> 
> This leads me to believe no one has actually begun to use Log4j in a
> modular project. Because how can they when they cannot access the API.
> 
> The Automatic-Module-Name should be instead "org.apache.logging.log4j".
> If the classes under the core package should not be used then it
> should not be exported.
> Perhaps then the Automatic-Module-Name needs to be
> "org.apache.logging.log4j.api".
> 
> But this is just the automatic module name that log4j has set. What is
> actually exported is also wrong. The Export-Package in JAR MANIFEST.MF
> exports not the API, but the implementation.
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Matt Sicker
Can you add a JIRA report for this?

On Sun, 24 Jun 2018 at 17:52, Sverre Moe  wrote:

> Perhaps the problem is that log4j-api.jar does not have a
> Automatic-Module-Name in its MANIFEST.MF.
> Only the log4j-core.jar has this entry in its manifest file.
> Den lør. 23. jun. 2018 kl. 14:00 skrev Sverre Moe :
> >
> > Apache Log4j may have a wrong Automatic-Module-Name
> > requires org.apache.logging.log4j.core;
> >
> > I cannot use the Logger and LogManager classes because they are not
> > accessible to my module.
> >
> > import org.apache.logging.log4j.LogManager;
> > import org.apache.logging.log4j.Logger;
> > private Logger logger = LogManager.getLogger(this.getClass());
> >
> > The type org.apache.logging.log4j.LogManager is not accessible
> > The type org.apache.logging.log4j.Logger is not accessible
> >
> > > "This is the central interface in the log4j package. Most logging
> operations, except configuration, are done through this interface. The
> canonical way to obtain a Logger for a class is through {@link
> LogManager#getLogger()}."
> >
> > The Logger implementation is accessible:
> > import org.apache.logging.log4j.core.Logger;
> >
> > It seems to me that the classes in core package is not to be accessed
> > directly by those using Log4j.
> >
> > This leads me to believe no one has actually begun to use Log4j in a
> > modular project. Because how can they when they cannot access the API.
> >
> > The Automatic-Module-Name should be instead "org.apache.logging.log4j".
> > If the classes under the core package should not be used then it
> > should not be exported.
> > Perhaps then the Automatic-Module-Name needs to be
> > "org.apache.logging.log4j.api".
> >
> > But this is just the automatic module name that log4j has set. What is
> > actually exported is also wrong. The Export-Package in JAR MANIFEST.MF
> > exports not the API, but the implementation.
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>

-- 
Matt Sicker 


Re: Wrong Exports and Automatic Module Name

2018-06-24 Thread Sverre Moe
Perhaps the problem is that log4j-api.jar does not have a
Automatic-Module-Name in its MANIFEST.MF.
Only the log4j-core.jar has this entry in its manifest file.
Den lør. 23. jun. 2018 kl. 14:00 skrev Sverre Moe :
>
> Apache Log4j may have a wrong Automatic-Module-Name
> requires org.apache.logging.log4j.core;
>
> I cannot use the Logger and LogManager classes because they are not
> accessible to my module.
>
> import org.apache.logging.log4j.LogManager;
> import org.apache.logging.log4j.Logger;
> private Logger logger = LogManager.getLogger(this.getClass());
>
> The type org.apache.logging.log4j.LogManager is not accessible
> The type org.apache.logging.log4j.Logger is not accessible
>
> > "This is the central interface in the log4j package. Most logging 
> > operations, except configuration, are done through this interface. The 
> > canonical way to obtain a Logger for a class is through {@link 
> > LogManager#getLogger()}."
>
> The Logger implementation is accessible:
> import org.apache.logging.log4j.core.Logger;
>
> It seems to me that the classes in core package is not to be accessed
> directly by those using Log4j.
>
> This leads me to believe no one has actually begun to use Log4j in a
> modular project. Because how can they when they cannot access the API.
>
> The Automatic-Module-Name should be instead "org.apache.logging.log4j".
> If the classes under the core package should not be used then it
> should not be exported.
> Perhaps then the Automatic-Module-Name needs to be
> "org.apache.logging.log4j.api".
>
> But this is just the automatic module name that log4j has set. What is
> actually exported is also wrong. The Export-Package in JAR MANIFEST.MF
> exports not the API, but the implementation.

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