https://github.com/sinuscosinustan/hetznercloud-java
Java Library for the Hetzner Cloud API
https://github.com/sinuscosinustan/hetznercloud-java
automation hcloud hetzner hetzner-cloud java
Last synced: 4 days ago
JSON representation
Java Library for the Hetzner Cloud API
- Host: GitHub
- URL: https://github.com/sinuscosinustan/hetznercloud-java
- Owner: sinuscosinustan
- License: mit
- Created: 2018-01-25T10:40:11.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-11-19T10:02:22.000Z (about 1 year ago)
- Last Synced: 2024-12-17T01:16:58.298Z (about 1 year ago)
- Topics: automation, hcloud, hetzner, hetzner-cloud, java
- Language: Java
- Homepage: https://tomsiewert.github.io/hetznercloud-java
- Size: 2.47 MB
- Stars: 48
- Watchers: 4
- Forks: 20
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
Hetzner Cloud API for Java
==========================


Simple Java client for the Hetzner Cloud API.
**Important message about this project [here](https://github.com/sinuscosinustan/hetznercloud-java/discussions/45)**
## Compile
This project uses Maven as build automation.
Just run ``mvn clean install`` to install it in the local Maven repository cache.
## How to use
##### Maven
Dependency:
```xml
io.github.sinuscosinustan
hetznercloud-api
5.0.1
```
##### Gradle
Put this in the ``build.gradle`` file of the project:
```groovy
repositories {
mavenCentral()
}
dependencies {
implementation "io.github.sinuscosinustan:hetznercloud-api:5.0.1"
}
```
kotlin-dsl
```kotlin
dependencies {
implementation("io.github.sinuscosinustan:hetznercloud-api:5.0.1")
}
```
## Requirements
- Java 17 or higher
- Maven 3.6.0 or higher
## How to run tests
This project has unit tests, as well as integration tests.
### Unit Tests (Default)
```bash
mvn test
```
### Integration Tests
Integration tests require an API Token for the Hetzner Cloud. Set the API token as an environment variable called `HCLOUD_TOKEN`.
To obtain an API key, please see [the official API documentation](https://docs.hetzner.cloud/#getting-started).
```bash
HCLOUD_TOKEN="${api_key}" mvn test -Pintegration-tests
```
### Code Quality
#### Checkstyle
Checkstyle runs automatically during compilation:
```bash
mvn compile
```
#### Code Coverage (JaCoCo)
Generate code coverage reports:
```bash
mvn test
```
View the HTML report at `target/site/jacoco/index.html`
## JavaDocs
The JavaDocs are available [here](https://sinuscosinustan.github.io/hetznercloud-java/)
## Dependencies
The following dependencies were used in this project:
* [jackson-databind](https://github.com/FasterXML/jackson-databind) under Apache2.0 License
* [Lombok](https://projectlombok.org) under MIT License