per-module module-source-path for javac

Nikolay Chashnikov nikolay.chashnikov at
Mon Dec 12 17:29:27 UTC 2016


we're actively working on support for Jigsaw in IntelliJ IDEA. Some time
ago we asked (see this post
about restrictions in --module-source-path parameter of javac command line.
It appears that currently javac has rather strict requirements regarding
layout of the source files of multi-module projects on the disk: module
sources must be located under a directory which name is equal to the
(qualified) module name, and locations of source directories for different
modules must follow some common scheme. It's ok for new projects, but it
complicates migration of existing projects to Jigsaw: you not only need to
create files, get rid of split packages, etc, but also
most probably you'll need to rearrange directories containing the sources.
For me, the latter looks like an unnecessary complication, it may make
migration to Jigsaw more difficult, especially for big projects developed
by large teams. I think it would be great to allow users to specify
module-source-path for each module individually.

Given that the implementation
already stores paths for different modules separately, it seems to be
rather easy to expose ability to specify module-source-path on per-module
basis to StandardJavaFileManager's API. The change in API suggested by
Jonathan Gibbons (see this post
looks good, it will allow us to support arbitrary layout of sources in
IntelliJ IDEA. Do you plan to implement it? How can we help you with that?

Nikolay Chashnikov
Team Lead
The Drive to Develop

More information about the jigsaw-dev mailing list