Combining --add-modules ALL-MODULE-PATH with --module-source-path
Nicolai Parlog
nipa at codefx.org
Tue May 23 09:21:17 UTC 2017
Hi!
Sorry for reviving such an old and pretty dead thread but I still
wonder about this. The gist is: Wouldn't it be nice to somehow (e.g.
with `--add-modules ALL-MODULE-PATH`) convince multi-module
compilation to compile all modules, regardless of whether they are
reachable from the initial module?
so long ... Nicolai
On 21.01.2017 10:34, Nicolai Parlog wrote:
> Hi!
>
> I have been experimenting with the the module source path and
> multi-module compilation and must say that it is really cool. I
> like how it operates on a higher level of abstraction.
>
> With a small application where the initial module transitively
> requires all others this is very nice:
>
> javac --module-path mods --module-source-path "./*/src/main/java"
> -d classes -module initial.module
>
> As soon as services show up, this does not work as smoothly
> anymore because the initial module does not depend on the service
> providers so they do not get compiled. That was expected.
>
> But to my surprise, using --add-modules ALL-MODULE-PATH does not
> change that. The following command has exactly the same result as
> above regarding service providing modules that the initial module
> does not transitively depend on:
>
> javac --module-path mods --module-source-path "./*/src/main/java"
> --add-modules ALL-MODULE-PATH -d classes -module initial.module
>
> Assuming I made no mistake, I find this a little odd. Is there a
> reason behind this that I don't see or is it an unimplemented
> feature? If the latter, I think it would be really nice to have it
> implemented in the interest of fidelity across phases. Launching
> the same application would look like this:
>
> java --module-path mods --add-modules ALL-MODULE-PATH -module
> initial.module
>
> And isn't that eerily similar. :)
>
> so long ... Nicolai
>
>
>
--
PGP Key:
http://keys.gnupg.net/pks/lookup?op=vindex&search=0xCA3BAD2E9CCCD509
Web:
http://codefx.org
a blog about software development
https://www.sitepoint.com/java
high-quality Java/JVM content
http://do-foss.de
Free and Open Source Software for the City of Dortmund
Twitter:
https://twitter.com/nipafx
More information about the jigsaw-dev
mailing list