Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tsundberg/maven-wait-plugin

A maven plugin that waits for an http resource to be available
https://github.com/tsundberg/maven-wait-plugin

http java-8 maven-plugin spark-java

Last synced: 7 days ago
JSON representation

A maven plugin that waits for an http resource to be available

Awesome Lists containing this project

README

        

# Maven wait plugin

A maven plugin that waits for an http resource to be available.

It will fail the build if the wanted resource isn't available within a time limit.

## Usage

Specify the url and call the plugin during your build.

There is one goal. Maven requires you to call it explicit.

## Configuration

### Url

The url where an http resource should be available.

http://localhost:4040//geo/rest/v1/gata

### Timeout

The time in milliseconds to wait for a resource.

1000

### Headers

The headers you want to set. Multiple headers are supported. Specify each header in a `headers` section.

This example specifies one header.


Acceptance test

### Example

Here is a complete example where we are waiting for a resource to appear at `http://localhost:4040//geo/rest/v1/gata`,
allow 1000 milliseconds before a timeout and set the header `applicationId` to `Acceptance test`


se.thinkcode.wait
http
${project.version}



wait


http://localhost:4040/geo/rest/v1/gata
1000

Acceptance test




### Skip waiting

Skip waiting by setting `http.wait.skip` to true

true

or by passing

-Dhttp.wait.skip

when running Maven.

### Waitable Status Codes

By default, this plugin waits as long as a `404` response status code is returned. You can configure additional status codes on which the plugin should wait via the `waitableStatuses` configurable element:


404
503

This will not append to the default of waiting on `404` responses, so you will need to deliberately specify that here if you wish to continue waiting on such a response status code.

## Release

Instructions are available in [release.md](./release.md) and at [Sonatype](http://central.sonatype.org/pages/apache-maven.html)