diff --git a/CHANGELOG.md b/CHANGELOG.md index ea88496047403449aad3a6125de18020c608839e..576f59c403774cdd32195591f774fcdafe3f95e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # embedmongo-maven-plugin Changelog +## 0.1.8 + +* Add `randomPort` configuration option (thanks @jumarko) + ## 0.1.7 * Add `logFile`/`logFileEncoding` configuration options (thanks @matthewadams) diff --git a/README.md b/README.md index 713012f6f2f63f48a27c4db077da41c915eece50..f5386a6a2d0910bfe43d58d72980cba39efbfe07 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Usage <plugin> <groupId>com.github.joelittlejohn.embedmongo</groupId> <artifactId>embedmongo-maven-plugin</artifactId> - <version>0.1.7</version> + <version>0.1.8</version> <executions> <execution> <id>start</id> @@ -21,6 +21,7 @@ Usage </goals> <configuration> <port>37017</port> <!-- optional, default 27017 --> + <randomPort>true</randomPort> <!-- optional, default is false, if true allocates a random port and overrides embedmongo.port --> <version>2.0.4</version> <!-- optional, default 2.2.1 --> <databaseDirectory>/tmp/mongotest</databaseDirectory> <!-- optional, default is a new dir in java.io.tmpdir --> <logging>file</logging> <!-- optional (file|console|none), default console --> @@ -48,7 +49,8 @@ Notes * By default, the `start` goal is bound to `pre-integration-test`, the `stop` goal is bound to `post-integration-test`. You can of course bind to different phases if required. * If you omit/forget the `stop` goal, any Mongo process spawned by the `start` goal will be stopped when the JVM terminates. -* If you want to run many Maven builds in parallel using Jenkins, try the [Port Allocator Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Port+Allocator+Plugin) to avoid port conflicts. +* If you want to run Maven builds in parallel you can use `randomPort` to avoid port conflicts, the value allocated will be available to other plugins in the project as a property `embedmongo.port`. + If you are using Jenkins, you can also try the [Port Allocator Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Port+Allocator+Plugin). * If you need to use a proxy to download MongoDB then you can either use `-Dhttp.proxyHost` and `-Dhttp.proxyPort` as additional Maven arguments (this will affect the entire build) or instruct the plugin to use a proxy when downloading Mongo by adding the `proxyHost` and `proxyPort` configuration properties. * Using the `file` logging mode results in a new log file created at `./embedmongo.log` unless you specify via `<logFile>` (where `.` means the curent working directory, usually the same as `${basedir}`). * If you'd like the start goal to start mongodb and wait, you can add `-Dembedmongo.wait` to your Maven command line arguments diff --git a/src/test/resources/example1/pom.xml b/src/test/resources/example1/pom.xml index e8c9f0cecda60dd0406f0a9c30e52ffbeadd5f8f..aceda34834be1a67dd70a747a5408dbae49fb2c0 100644 --- a/src/test/resources/example1/pom.xml +++ b/src/test/resources/example1/pom.xml @@ -29,7 +29,7 @@ <plugin> <groupId>com.github.joelittlejohn.embedmongo</groupId> <artifactId>embedmongo-maven-plugin</artifactId> - <version>0.1.8-SNAPSHOT</version> + <version>0.1.9-SNAPSHOT</version> <executions> <execution> <id>start</id> diff --git a/src/test/resources/example2/pom.xml b/src/test/resources/example2/pom.xml index 4470b9a6eb3b321c3f7d72e9e7f7ce51cee706ac..deaf73804a650d8cb94d7c787ffa7a34fe4b19b6 100644 --- a/src/test/resources/example2/pom.xml +++ b/src/test/resources/example2/pom.xml @@ -29,7 +29,7 @@ <plugin> <groupId>com.github.joelittlejohn.embedmongo</groupId> <artifactId>embedmongo-maven-plugin</artifactId> - <version>0.1.8-SNAPSHOT</version> + <version>0.1.9-SNAPSHOT</version> <executions> <execution> <id>start</id> diff --git a/src/test/resources/example3/pom.xml b/src/test/resources/example3/pom.xml index 59618aa89223df49ad40a65424d98ba27692a089..00015584b97fddaf2694905b35bbb872159b2d09 100644 --- a/src/test/resources/example3/pom.xml +++ b/src/test/resources/example3/pom.xml @@ -29,7 +29,7 @@ <plugin> <groupId>com.github.joelittlejohn.embedmongo</groupId> <artifactId>embedmongo-maven-plugin</artifactId> - <version>0.1.8-SNAPSHOT</version> + <version>0.1.9-SNAPSHOT</version> <executions> <execution> <id>start</id> diff --git a/src/test/resources/randomport/pom.xml b/src/test/resources/randomport/pom.xml index 614010f09c1ad158c38a9fcaec444496921c6b99..f513b23b10dd454b58cdc5275d7e32259d860d1c 100644 --- a/src/test/resources/randomport/pom.xml +++ b/src/test/resources/randomport/pom.xml @@ -30,7 +30,7 @@ <plugin> <groupId>com.github.joelittlejohn.embedmongo</groupId> <artifactId>embedmongo-maven-plugin</artifactId> - <version>0.1.8-SNAPSHOT</version> + <version>0.1.9-SNAPSHOT</version> <executions> <execution> <id>start</id> @@ -85,7 +85,7 @@ <dependency> <groupId>com.github.joelittlejohn.embedmongo</groupId> <artifactId>embedmongo-maven-plugin</artifactId> - <version>0.1.8-SNAPSHOT</version> + <version>0.1.9-SNAPSHOT</version> </dependency> </dependencies>