hibernate-ogm-mongodb
Used in
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>org.hibernate.ogm</groupId> <artifactId>hibernate-ogm-mongodb</artifactId> <version>5.4.2.Final</version> </dependency>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>hibernate-ogm-parent</artifactId> <groupId>org.hibernate.ogm</groupId> <version>5.4.2.Final</version> <relativePath>..</relativePath> </parent> <artifactId>hibernate-ogm-mongodb</artifactId> <name>Hibernate OGM for MongoDB</name> <description>Persist objects in MongoDB</description> <build> <plugins> <plugin> <groupId>org.bsc.maven</groupId> <artifactId>maven-processor-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <environmentVariables> <MONGODB_HOSTNAME>${env.MONGODB_HOSTNAME}</MONGODB_HOSTNAME> <MONGODB_PORT>${env.MONGODB_PORT}</MONGODB_PORT> </environmentVariables> <systemPropertyVariables> <mongodbProvider>${mongodbProvider}</mongodbProvider> </systemPropertyVariables> <forkMode>once</forkMode> <!-- Apache Lucene uses assertions which currently fail on JDK9: --> <!-- not sure yet how that is going to be resolved, but it's not an OGM problem. --> <enableAssertions>false</enableAssertions> <dependenciesToScan> <dependency>org.hibernate.ogm:hibernate-ogm-core</dependency> </dependenciesToScan> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> </plugin> </plugins> <testResources> <testResource> <directory>src/test/resources</directory> <filtering>true</filtering> </testResource> </testResources> </build> <dependencies> <!-- Compile --> <dependency> <groupId>org.hibernate.ogm</groupId> <artifactId>hibernate-ogm-core</artifactId> </dependency> <dependency> <groupId>org.hibernate.common</groupId> <artifactId>hibernate-commons-annotations</artifactId> </dependency> <dependency> <groupId>org.hibernate.hql</groupId> <artifactId>hibernate-hql-parser</artifactId> </dependency> <dependency> <groupId>org.mongodb</groupId> <artifactId>mongodb-driver-legacy</artifactId> <exclusions> <!-- The bson-record-codec module is not needed for hibernate-ogm, and needs to be excluded at least for tests because the class files in that module are compiled for Java 17 (the minimum LTS release required for record support). --> <exclusion> <artifactId>bson-record-codec</artifactId> <groupId>org.mongodb</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.parboiled</groupId> <artifactId>parboiled-java</artifactId> </dependency> <dependency> <groupId>org.jboss.logging</groupId> <artifactId>jboss-logging-processor</artifactId> <!-- "provided" is used as "compile-only" here; It's NOT needed at runtime --> <scope>provided</scope> </dependency> <!-- Test --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search-orm</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.hibernate.ogm</groupId> <artifactId>hibernate-ogm-core</artifactId> <type>test-jar</type> <scope>test</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.easytesting</groupId> <artifactId>fest-assert</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.spec.javax.transaction</groupId> <artifactId>jboss-transaction-api_1.2_spec</artifactId> <scope>provided</scope> </dependency> <!-- Required by PackagingRule --> <dependency> <groupId>org.jboss.shrinkwrap</groupId> <artifactId>shrinkwrap-impl-base</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.takari.junit</groupId> <artifactId>takari-cpsuite</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.skyscreamer</groupId> <artifactId>jsonassert</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.byteman</groupId> <artifactId>byteman</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.byteman</groupId> <artifactId>byteman-bmunit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.byteman</groupId> <artifactId>byteman-install</artifactId> <scope>test</scope> </dependency> </dependencies> <profiles> <!-- Executes the tests against a MongoDB which is automatically started/stopped by this build --> <profile> <id>embedded-mongodb</id> <activation> <property> <name>!useExternalMongoDb</name> </property> </activation> <properties> <datastoreProvider>mongodb</datastoreProvider> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <environmentVariables> <MONGODB_PORT>${mongodb.embedded.port}</MONGODB_PORT> <MONGODB_HOSTNAME>${mongodb.embedded.bind-ip}</MONGODB_HOSTNAME> </environmentVariables> <forkMode>once</forkMode> </configuration> </plugin> <plugin> <groupId>com.github.joelittlejohn.embedmongo</groupId> <artifactId>embedmongo-maven-plugin</artifactId> <executions> <execution> <id>start-embedded-mongodb</id> <phase>generate-test-resources</phase> <goals> <goal>start</goal> </goals> </execution> <execution> <id>stop-embedded-mongodb</id> <!-- Using phase "test" to trigger shut down when running "mvn test". This is safe because the Surefire plug-in is configured above and order of declaration within a POM is considered to resolve execution order of two plug-ins with executions in the same phase --> <phase>test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> <!-- Executes the tests against a separately started MongoDB server --> <profile> <id>external-mongodb</id> <activation> <property> <name>useExternalMongoDb</name> </property> </activation> <properties> <datastoreProvider>mongodb</datastoreProvider> </properties> <build> <plugins> <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> <excludes> <!-- MongoDB 7.0 (the one we use for remote testing on CI) doesn't support `$eval` anymore --> <exclude>**/PositionalParametersStoredProcedureCallTest.java</exclude> </excludes> </configuration> </plugin> </plugins> </build> </profile> </profiles> </project>