Core: @OpenmrsProfile to filter for modules that are absent

Yes it is a consequence of attempting a full leverage of the ‘aware of’ config directive. When doing so one might not so much be interested in filtering for ranges of versions of a module, but rather to know whether a module is present (with any version) or missing.


Our specific use case is about AH’s awareness of Ext I18N.

  • If Ext I18N is present it should provide an implementation to one of AH’s interfaces. @OpenmrsProfile(modules = {"exti18n:*"})

  • If Ext I18N is absent then AH itself should provide a default implementation to its interface. @OpenmrsProfile(modules = {"exti18n:_"})

The above config could be put in place, with @Autowired-annotated instances of AH’s interface, that would work both at runtime and within context-sensitive tests. See also ‘Core: enabling context-sensitive tests to start modules’.

Cc @mogoodrich