Avoid specify the datastore module when adding the ogm module

Description

Currently, when a user using WildFly wants to include OGM in his bean using the JBoss modules system needs to do the following:

1 2 3 4 5 6 7 8 <jboss-deployment-structure> <deployment> <dependencies> <module name="org.hibernate" slot="ogm" services="export" /> <module name="org.hibernate.ogm.<%DATASTORE%>" slot="main" services="export" /> </dependencies> </deployment> </jboss-deployment-structure>

It should be possible to omit the datastore line by adding an optional dependecy to the to the available datastore in the core module.

The module.xml in the core module "org.hibernate:ogm" will have these additional entries:

1 2 3 4 5 <module name="org.hibernate.ogm.infinispan" optional="true" service="export" /> <module name="org.hibernate.ogm.couchdb" optional="true" /> <module name="org.hibernate.ogm.neo4j" optional="true" /> <module name="org.hibernate.ogm.ehcache" optional="true" /> ...

Since they are optional the user can remove form WildFly the modules that he does not need.

Environment

None

Status

Assignee

Unassigned

Reporter

Davide D'Alto

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Fix versions

Affects versions

4.1.1.Final

Priority

Major