Skip to content

Maven plugin to start and stop stubby4j as part of the maven build lifecycle

License

Notifications You must be signed in to change notification settings

goughy000/stubby-maven-plugin

Repository files navigation

stubby-maven-plugin

Maven plugin to start and stop stubby4j as part of the maven build lifecycle

This can be useful when you are spinning up an application for integration testing and it needs to connect to another HTTP service. Combine with a port finder plugin for concurrent usage on build servers

You can find configuration info for the stubs.yaml file itself on the Stubby4J project page

Configuration

Default values for configuration shown

<build>
<plugins>
  <plugin>
    <groupId>com.testingsyndicate</groupId>
    <artifactId>stubby-maven-plugin</artifactId>
    <version>1.0.1</version>
    <executions>
      <execution>
        <goals>
          <goal>start</goal>
          <goal>stop</goal>
        </goals>
        <configuration>
          <configFile>src/test/resources/stubs.yaml</configFile>
          <httpPort>8882</httpPort>
          <mute>true</mute>
          <httpsPort />
          <adminPort />
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>
</build>

You can also quickly start stubby to manually validate your stubs file

mvn stubby:run -DconfigFile=path/to/stubs.yaml

About

Maven plugin to start and stop stubby4j as part of the maven build lifecycle

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages