Created
May 18, 2013 11:08
Maven POM snippet for tests that need embedded MongoDB instance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mongo DB options, configure these if you are using the "mongo" option for one of your stores | |
mongoDbHost=127.0.0.1 | |
mongoDbPort=27018 | |
mongoDbDatabase=db_test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<profiles> | |
<profile> | |
<id>mongodb-tests</id> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>com.github.joelittlejohn.embedmongo</groupId> | |
<artifactId>embedmongo-maven-plugin</artifactId> | |
<version>0.1.7</version> | |
<executions> | |
<execution> | |
<id>start</id> | |
<phase>process-test-classes</phase> | |
<goals> | |
<goal>start</goal> | |
</goals> | |
<configuration> | |
<!-- see src/test/resources/mongodb.properties --> | |
<port>27018</port> | |
<version>2.1.1</version> | |
<databaseDirectory>${project.build.directory}/mongodb_test</databaseDirectory> | |
</configuration> | |
</execution> | |
<execution> | |
<id>stop</id> | |
<goals> | |
<goal>stop</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</profile> | |
</profiles> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment