Issue with qualified exports

Alan Bateman Alan.Bateman at oracle.com
Thu Jul 21 08:55:12 UTC 2016


On 21/07/2016 09:14, Peter Levart wrote:

> Also,
>
> While it is expected that qualified exports are mostly used among 
> modules that are more tightly coupled and are therefore more likely 
> compiled together, some tools that invoke compiler (for example 
> Maven), have a strategy to compile one module at a time, incrementally 
> building the artifacts as the dependency tree instructs (because they 
> must insert other building steps before or after compilation of each 
> module, such as generating sources, etc...).
>
> So we have a problem here if such tool wants to 1st compile module A 
> alone and then compile B which has a "requires" dependency on A, 
> because A also has a qualified "export" dependency on B. An option 
> like below could enable such separate compilation.
>
Single module compilation should be fine, assuming the source to the 
referenced module is found (-modulesourcepath). We have exactly this 
with the JDK build where modules are compiled in reverse topology order. 
However, fair point about Maven projects, as qualified exports are going 
to be problematic if they are separate projects as opposed to a 
multi-module project.

-Alan


More information about the jigsaw-dev mailing list