https://github.com/yegor256/jping-maven-plugin
Maven plugin that checks whether the host machine is connected to the Internet or not
https://github.com/yegor256/jping-maven-plugin
java maven-plugin online-status
Last synced: over 1 year ago
JSON representation
Maven plugin that checks whether the host machine is connected to the Internet or not
- Host: GitHub
- URL: https://github.com/yegor256/jping-maven-plugin
- Owner: yegor256
- License: mit
- Created: 2024-05-08T00:19:49.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-21T16:50:11.000Z (over 1 year ago)
- Last Synced: 2024-10-22T05:51:16.655Z (over 1 year ago)
- Topics: java, maven-plugin, online-status
- Language: Java
- Homepage:
- Size: 412 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# It checks whether the machine is online
[](https://www.elegantobjects.org)
[](http://www.rultor.com/p/yegor256/jping-maven-plugin)
[](https://github.com/yegor256/jping-maven-plugin/actions/workflows/mvn.yml)
[](http://www.0pdd.com/p?name=yegor256/jping-maven-plugin)
[](https://maven-badges.herokuapp.com/maven-central/com.yegor256/jping-maven-plugin)
[](http://www.javadoc.io/doc/com.yegor256/jping-maven-plugin)
[](https://codecov.io/gh/yegor256/jping-maven-plugin)
Add it to your `pom.xml`:
```xml
com.yegor256
jping-maven-plugin
0.0.2
jping
${project.build.directory}/we-are-online.txt
we-are-online
true
false
https://www.google.com
1000
1000
```
It runs, by default, at the `initialize` phase and checks whether
the machine is connected to the Internet or not (by making a test
HTTP connection to the `url` specified). If the connection is alive,
the value of the `we-are-online` property will be set to `true`.
Otherwise, the property will not be set.
Also, if the machine is connected to the Internet, a file will be
created, as specified in the `fileName` configuration parameter. If
the machine is offline, the file will be deleted (if it exists).
## How to contribute?
Fork the repository, make changes, submit a pull request.
We promise to review your changes same day and apply to
the `master` branch, if they look correct.
Please run Maven build before submitting a pull request:
```
$ mvn clean install -Pqulice
```