You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jekyll-www.mock-server.com/mock_server/_includes/creating_expectations.html
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -56,13 +56,16 @@
56
56
);</code></pre>
57
57
</div>
58
58
59
-
<p>To use the Java client add the <strong>org.mock-server:mockserver-netty:5.13.1</strong> dependency. The <strong>shaded</strong> classifier can be used to reduce any conflicts with MockServer dependencies, for example in maven:</p>
59
+
<p>To use the Java client add the <strong>org.mock-server:mockserver-client-java-no-dependencies:5.13.1</strong> dependency.
60
+
61
+
<p>For more details about the different dependency versions see the page on <ahref="/where/maven_central.html#mockserver_client_java">Maven Central</a></p>
<p>To start the server or proxy create a client, for example by using one of the start factory methods <spanclass="inline_code">ClientAndServer.startClientAndServer</span> as follows:</p>
@@ -219,7 +220,7 @@ <h2>Running MockServer via a JUnit 4 @Rule</h2>
<li><atarget="_blank" href="https://search.maven.org/#search%7Cga%7C1%7Cmockserver-netty">mockserver-netty</a> - a web server for mocking and proxying using Netty
20
21
21
22
<p>Add to a maven build pom.xml as follows:</p>
@@ -24,9 +25,8 @@ <h2>Maven Central <a target="_blank" href="https://search.maven.org/
<li><atarget="_blank" href="https://search.maven.org/#search%7Cga%7C1%7Cmockserver-netty">mockserver-netty:shaded</a> - as above using Netty that includes all dependencies are bundled into the jar file, this artifact
43
-
<atarget="_blank" href="https://search.maven.org/remotecontent?filepath=org/mock-server/mockserver-netty/5.13.1/mockserver-netty-5.13.1-shaded.jar">can be downloaded</a>.
44
-
</li>
42
+
<p>The following versions are available for <strong>mockserver-netty</strong> in Maven Central. These dependencies work for Maven, Gradle, Scala SBT, Apache Ivy, etc</p>
43
+
44
+
<ul>
45
+
<li><strong>org.mock-server:mockserver-netty-no-dependencies:5.13.1</strong> - MockServer compiled code and transitive dependencies bundled into a single jar, with packages for most transitive dependencies being updated to avoid clashes with dependencies from projects importing MockServer. This has no transitive dependencies and so is the recommended best option.</li>
46
+
<li><strong>org.mock-server:mockserver-netty:5.13.1</strong> - only MockServer compiled code with transitive dependencies pulled in by Maven, Gradle, etc. As per normal Maven or Ivy dependencies this includes transitive dependencies (in its pom.xml) which would be pulled in by Maven, Gradle, Ivy, SBT, etc unless explicitly excluded.</li>
47
+
<li><strong>org.mock-server:mockserver-netty:5.13.1:shaded</strong> - MockServer compiled code and transitive dependencies bundled into a single jar, with packages for most transitive dependencies being updated to avoid clashes with dependencies from projects importing MockServer. Because classifiers all use the same pom.xml this library still includes transitive dependencies (in its pom.xml) which would be pulled in by Maven, Gradle, Ivy, SBT, etc unless explicitly excluded. Use the <strong>org.mock-server:mockserver-netty-no-dependencies:5.13.1</strong> dependencies to avoid the transitive dependencies.</li>
48
+
<li><strong>org.mock-server:mockserver-netty:5.13.1:jar-with-dependencies</strong> - MockServer compiled code and transitive dependencies bundled into a single jar. Because classifiers all use the same pom.xml this library still includes transitive dependencies (in its pom.xml) which would be pulled in by Maven, Gradle, Ivy, SBT, etc unless explicitly excluded. Use the <strong>org.mock-server:mockserver-netty-no-dependencies:5.13.1</strong> dependencies to avoid the transitive dependencies.</li>
49
+
</ul>
50
+
51
+
</li>
45
52
46
53
<li><atarget="_blank" href="https://search.maven.org/#search%7Cga%7C1%7Cmockserver-war">mockserver-war</a> - a deployable WAR for mocking that can be deployed to any JEE web server, this artifact
47
54
<atarget="_blank" href="https://search.maven.org/remotecontent?filepath=org/mock-server/mockserver-war/5.13.1/mockserver-war-5.13.1.war">can be downloaded</a>.
@@ -64,25 +71,35 @@ <h2>Maven Central <a target="_blank" href="https://search.maven.org/
<li><atarget="_blank" href="https://search.maven.org/#search%7Cga%7C1%7Cmockserver-client-java">mockserver-client-java</a> - a Java client to communicate with both the server and the proxy
<p>The following versions are available for the Java client in Maven Central. These dependencies work for Maven, Gradle, Scala SBT, Apache Ivy, etc</p>
94
+
95
+
<ul>
96
+
<li><strong>org.mock-server:mockserver-client-java-no-dependencies:5.13.1</strong> - MockServer compiled code and transitive dependencies bundled into a single jar, with packages for most transitive dependencies being updated to avoid clashes with dependencies from projects importing MockServer. This has no transitive dependencies and so is the recommended best option.</li>
97
+
<li><strong>org.mock-server:mockserver-client-java:5.13.1</strong> - only MockServer compiled code with transitive dependencies pulled in by Maven, Gradle, etc. As per normal Maven or Ivy dependencies this includes transitive dependencies (in its pom.xml) which would be pulled in by Maven, Gradle, Ivy, SBT, etc unless explicitly excluded.</li>
98
+
<li><strong>org.mock-server:mockserver-client-java:5.13.1:shaded</strong> - MockServer compiled code and transitive dependencies bundled into a single jar, with packages for most transitive dependencies being updated to avoid clashes with dependencies from projects importing MockServer. Because classifiers all use the same pom.xml this library still includes transitive dependencies (in its pom.xml) which would be pulled in by Maven, Gradle, Ivy, SBT, etc unless explicitly excluded. Use the <strong>org.mock-server:mockserver-client-java-no-dependencies:5.13.1</strong> dependencies to avoid the transitive dependencies.</li>
99
+
<li><strong>org.mock-server:mockserver-client-java:5.13.1:jar-with-dependencies</strong> - MockServer compiled code and transitive dependencies bundled into a single jar. Because classifiers all use the same pom.xml this library still includes transitive dependencies (in its pom.xml) which would be pulled in by Maven, Gradle, Ivy, SBT, etc unless explicitly excluded. Use the <strong>org.mock-server:mockserver-client-java-no-dependencies:5.13.1</strong> dependencies to avoid the transitive dependencies.</li>
100
+
</ul>
101
+
102
+
</li>
86
103
87
104
<li><atarget="_blank" href="https://search.maven.org/#search%7Cga%7C1%7Cmockserver-client-java">mockserver-junit-rule</a> - a <ahref="/mock_server/running_mock_server.html#junit_rule">Junit 4 @Rule</a> that starts MockServer (<strong>for both mocking and proxying</strong>) on a free port before the any test runs and stops MockServer after all tests have completed.</li>
0 commit comments