From db1510513de201647a0ed662b16df3036fd1ca90 Mon Sep 17 00:00:00 2001
From: Joe Littlejohn <joelittlejohn@gmail.com>
Date: Sun, 2 Jun 2013 18:18:35 +0100
Subject: [PATCH] Doc updates for 0.1.8

---
 CHANGELOG.md                          | 4 ++++
 README.md                             | 6 ++++--
 src/test/resources/example1/pom.xml   | 2 +-
 src/test/resources/example2/pom.xml   | 2 +-
 src/test/resources/example3/pom.xml   | 2 +-
 src/test/resources/randomport/pom.xml | 4 ++--
 6 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index ea88496..576f59c 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 713012f..f5386a6 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 e8c9f0c..aceda34 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 4470b9a..deaf738 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 59618aa..0001558 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 614010f..f513b23 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>
 
-- 
GitLab