Skip to main content

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

The content of the Maven classpath container is serialized after any changes, to speed up performance the next time the workspace restarts.

So we need to populate the container with Maven entries, save it on disk, then check each  classpathentry to see if it's a module on the modulepath, set the flag on, save the container again. 

m2e does not embed the maven-compiler-plugin jar or its dependencies so we can't reuse the API used by maven to inspect the dependencies, instead we rely on what JDT provide.

Anyways, I think I can work on something from the IJavaProject. I'll let you know how it goes :-)


On Tue, Sep 5, 2017 at 6:57 PM, Stephan Herrmann <stephan.herrmann@xxxxxxxxx> wrote:
On 06.09.2017 00:06, Fred Bricon wrote:
We could of course add the Java nature, set the Maven classpath container, save the classpath and then go back on each classpath entry to tune the module flag, then save the classpath again.
The last part looks wrong to me: why save the classpath again?
You're not adding individual dependencies for individual artifacts
to the classpath, are you?

Do you speak about configuration time (creating a Java project) or
resolution time (populating a classpath container)?

So, if the Maven classpath *container* does not have the "module" attribute,
then when you (later) resolve the container to its individual entries,
add "module" to those that you consider as modules.

OTOH, if you need Java 9 smarts before JDT is enabled, I'd expect
that you could easily use Maven API to inspect Maven dependencies?

am I missing anything?
Stephan



--
"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