Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] Questions on Java 9 Modules API

Hi,

I'm looking into providing support for Java 9 in m2e.

The way the module path is computed in Maven is via reading module-info.class, or module-info.java first, list all required modules, then iterate over all dependencies in the project classpath, check if a dependency is in the list of required modules, then Maven adds it to the module path.

When a project is configured via m2e, we gather all classpath informations from the Maven in-memory model then try to match that into JDT settings (add Java nature, build Maven classpath container entries from Maven dependencies...)

So, what I'm looking for, to try to reproduce Maven's behavior, is a way to:

1 - get all required modules from a module-info.java file (at that point the project is not a Java project yet), so will most likely rely on some AST parsing
2 - find the module name (either automatic or implicit) of a given jar (from File or Path)
 
If anyone could give me some pointers, I'd be grateful. 

Thanks,

Fred
 

--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5

Back to the top