Re: Java Modules

2017-10-16 Thread Ralph Goers
Just to capture this, the way this can be handled is to use the —add-exports option of javac. (See https://docs.oracle.com/javase/9/tools/javac.htm#GUID-AEEC9F07-CB49-4E96-8BC7-BCC2C7F725C9__NONSTANDARDOPTIONSFORJAVAC-7D3DAA9D

Re: Java Modules

2017-10-15 Thread Ralph Goers
You are welcome to create a Jira issue and do it! Ralph > On Oct 15, 2017, at 12:50 PM, Mikael Ståldal wrote: > > On 2017-10-15 07:40, Ralph Goers wrote: >> I have committed the code for LOG4J2-2056. Log4j-api is a “real” module and >> has a module-info.java while all the rest that can be modu

Re: Java Modules

2017-10-15 Thread Mikael Ståldal
On 2017-10-15 07:40, Ralph Goers wrote: I have committed the code for LOG4J2-2056. Log4j-api is a “real” module and has a module-info.java while all the rest that can be modularized are automatic modules. Please review and test. I don't think we should modularize log4j-nosql. I think we shou

Re: Java Modules

2017-10-15 Thread Ralph Goers
I just remembered that option 2 wouldn’t be sufficient as it would only export at run time. The implementation needs access at compile time. I remember there are ways to achieve this but I don’t recall what they are at the moment, but I seem to recall is still requires calling module.exports. R

Re: Java Modules

2017-10-15 Thread Ralph Goers
Yes, you can target specific packages for exposure to specific modules. Yes, we would want to move the classes that are “private” to a sub package of util if we were to do that. As for the name, yes you could specify multiple exports but that would mean we would need to know the name of every l

Re: Java Modules

2017-10-15 Thread Remko Popma
You mean we may want to do something like this in the future? module org.apache.logging.log4j { 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.

Re: Java Modules

2017-10-15 Thread Ralph Goers
FWIW, I am still torn on whether log4j-core should have a module name of org.apache.logging.log4j.core or org.apache.logging.log4j.impl. If it is the second then log4j-api could restrict exporting packages only meant for the implementation to that module. That would require some refactoring of t

Java Modules

2017-10-14 Thread Ralph Goers
I have committed the code for LOG4J2-2056. Log4j-api is a “real” module and has a module-info.java while all the rest that can be modularized are automatic modules. Please review and test. In order to create the module-info.java I had to do a few strange things: Module-info.java is in the log4j