Running WireMock as a Maven plugin

1,689 views
Skip to first unread message

theautoma...@gmail.com

unread,
Aug 28, 2016, 9:50:32 AM8/28/16
to wiremock-user
There are a few basic options to run WireMock: WireMockRule, WireMockServer and standalone JAR. This works well for most scenarios, however in some scenarios one more option would be handy.

Sample scenario:
JMeter tests are executed with jmeter-maven-plugin at integration-test phase, and some mocks are needed. The most natural solution would be to turn on WireMock at pre-integration-test phase and turn it off at post-integration-test phase. Similarily to what can be achieved with jetty-maven-plugin. Maven plugin seems to be a natural and perfect fit for that. I cannot find any mention of wiremock plugin on wiremock.org, neither in maven central. The only project I found is https://github.com/rodrigosaito/wiremock-maven-plugin. However, it doesn't seem to be a stable, ready to use solution.

Is there a WireMock Maven plugin I could use? If not, I'm happy to create one and release to maven central so others can use it too. Just asking, before I reinvent possibly existing wheel...

Tom Akehurst

unread,
Aug 30, 2016, 11:41:17 AM8/30/16
to wiremock-user
The only one I'm aware of is the one you linked to. If it's defunct I'd say you're not wasting your time writing a new version. I'd be happy to link to it from wiremock.org once it's up and running.

theautoma...@gmail.com

unread,
Sep 7, 2016, 4:12:56 PM9/7/16
to wiremock-user
It is on GitHub now + available in Maven Central:
https://github.com/automatictester/wiremock-maven-plugin

Tom Akehurst

unread,
Sep 7, 2016, 4:14:15 PM9/7/16
to wiremock-user
Great stuff. Apologies for not having taken a look yet. Will do so as soon as things let up a bit.

theautoma...@gmail.com

unread,
Dec 18, 2016, 12:46:36 PM12/18/16
to wiremock-user
Project has been moved to new location:
https://github.com/deliverymind/wiremock-maven-plugin
As per GitHub readme, groupId is now changed to: uk.co.deliverymind
Most recent version (2.1.0) uses latest WireMock 2.4.1.

Reply all
Reply to author
Forward
0 new messages