Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/tsundberg/maven-wait-plugin
- Owner: tsundberg
- License: mit
- Created: 2017-07-03T20:47:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-08-15T17:44:30.000Z (over 1 year ago)
- Last Synced: 2024-04-24T12:01:22.380Z (7 months ago)
- Topics: http, java-8, maven-plugin, spark-java
- Language: Java
- Size: 85.9 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)