2.1.3. Define Module Dependencies

Managing module dependencies is especially important when using frameworks like OSGi where you could have a module X and a module Y each one of them containing a type with the fully qualified name a.b.c.Type. Such conflicts are resolvable by defining manual module dependencies. These module dependencies control the type resolution when creating parser dependencies trying to locate the 'to' (Java) type.

If the modules do not define any dependencies all types are visible in all modules. Once there are type resolution conflicts which would show up as 'Ambiguous Target Type' issues manual module dependencies can be used to decide which type(s) should be accessed from which module. If module Z accesses the type a.b.c.Type defined in module X and module Y the conflict is resolved by simply defining a manual module dependency between module Z and the correct target module.

NOTE

If you know how modules are supposed to use each other, define the workspace dependencies explicitly.