For me the configuration in the OGM documentation did not work.
If I remember correctly the main difference was the MANIFEST.MF
I use:
Code:
Dependencies: org.hibernate.ogm:main services, org.hibernate.ogm.mongodb:main services
I think in the documentation there are version numbers instead of "main". I think the right slot for hibernate search is also "main".
I in persistence.xml I use the following:
Code:
<properties>
<!--<property name="wildfly.jpa.hibernate.search.module" value="org.hibernate.search.orm:5.6.1.Final-orm51"/>-->
<property name="jboss.as.jpa.providerModule" value="org.hibernate:5.1"/>
<property name="hibernate.ogm.datastore.provider" value="<your dbms>"/>
<property name="hibernate.ogm.datastore.database" value="<your db>"/>
</properties>
(I don't use hibernate search anymore (too many missing features) but this would be the right property - I think in the documentation there is also a different value that did not work for me)
In my project I have a quite complex pom hierarchy and I hope I extracted the right bits to get a correctly patched wildfly 10 configuration
Parent:
Code:
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<version.javaee>7.0</version.javaee>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jboss.home>${env.JBOSS_HOME}</jboss.home>
<version.wildfly>10.1.0.Final</version.wildfly>
<version.wildfly.bom>${version.wildfly}</version.wildfly.bom>
<version.wildfly.hibernate.orm>5.1.4.Final</version.wildfly.hibernate.orm>
<version.wildfly.hibernate.ogm>5.1.0.Final</version.wildfly.hibernate.ogm>
<version.wildfly.hibernate.search>5.6.1.Final</version.wildfly.hibernate.search>
<version.wildfly.arquillian>8.2.1.Final</version.wildfly.arquillian>
<version.jboss.shrinkwarp.resolver>2.2.6</version.jboss.shrinkwarp.resolver>
<version.maven.clean.plugin>3.0.0</version.maven.clean.plugin>
<version.maven.compiler.plugin>3.1</version.maven.compiler.plugin>
<version.maven.dependency.plugin>3.0.0</version.maven.dependency.plugin>
<version.maven.resources.plugin>3.0.0</version.maven.resources.plugin>
<version.maven.war.plugin>3.0.0</version.maven.war.plugin>
<version.maven.surefire.plugin>2.19.1</version.maven.surefire.plugin>
<version.wildfly.maven.plugin>1.1.0.Final</version.wildfly.maven.plugin>
<version.versions.maven.plugin>2.4</version.versions.maven.plugin>
<version.junit>4.12</version.junit>
</properties>
child for getting a clean installation:
Code:
<properties>
<classifier.wildfly.dist>wildfly-10-dist</classifier.wildfly.dist>
[...]
</properties>
<profiles>
<!--
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// WILDFLY-BARE
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-->
<profile>
<id>wildfly-bare</id>
<build>
<plugins>
<!-- Delete previous installation -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${version.maven.clean.plugin}</version>
<configuration>
<filesets>
<fileset>
<directory>${jboss.home}</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- Download/unpack wildfly and custom modules -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>${version.maven.dependency.plugin}</version>
<executions>
<execution>
<id>unpack</id>
<phase>clean</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-dist</artifactId>
<version>${version.wildfly}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${jboss.home}/..</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-orm-modules</artifactId>
<version>${version.wildfly.hibernate.orm}</version>
<classifier>${classifier.wildfly.dist}</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${jboss.home}/modules</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-modules</artifactId>
<classifier>${classifier.wildfly.dist}</classifier>
<version>${version.wildfly.hibernate.ogm}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${jboss.home}/modules</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-modules</artifactId>
<version>${version.wildfly.hibernate.search}</version>
<classifier>${classifier.wildfly.dist}</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${jboss.home}/modules</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
[...]
</profiles>
I hope this helps...