Optional dependencies
Alan Bateman
Alan.Bateman at oracle.com
Tue Dec 1 15:39:28 UTC 2015
On 01/12/2015 15:08, Stephen Colebourne wrote:
> :
>
> The real problem here is that the variants of each of these projects
> are not really significant. I want users to depend on the concept of
> Joda-Time, and for them to pickup the benefits of Joda-Convert if they
> decide to refer to the module directly. It seems like there should be
> a way to represent this.
>
This should be doable but maybe not obvious. Can you say a bit more
about the Joda-Time optional dependency on Joda-Convert first? In
particular, are there static references to types in Joda-Convert and
maybe a reflection guard to check the presence of one of its types?
It might be that you have to compile module joda.time with
-XaddReads:joda.time=joda.convert. At run-time then you can use Module
addReads to read module joda.convert when it's in the module graph.
-Alan
More information about the jigsaw-dev
mailing list