Skip to content

Commit 6e169b7

Browse files
authored
feat(docs): add maven central usage guide and contribution guide (#22)
relates to STACKITSDK-207
1 parent 35846ff commit 6e169b7

File tree

2 files changed

+110
-10
lines changed

2 files changed

+110
-10
lines changed

CONTRIBUTION.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Contribute to the STACKIT Java SDK
2+
3+
Your contribution is welcome! Thank you for your interest in contributing to the STACKIT Java SDK.
4+
We greatly value your feedback, feature requests, additions to the code, bug reports or documentation extensions.
5+
6+
## Table of contents
7+
8+
- [Developer Guide](#developer-guide)
9+
- [Repository structure](#repository-structure)
10+
- [Code Contributions](#code-contributions)
11+
- [Bug Reports](#bug-reports)
12+
13+
## Developer Guide
14+
15+
Building the STACKIT Java SDK requires:
16+
1. Java SDK (version 11 to 21 should be supported) installed on your system
17+
18+
In case you want to open the project in your preferred IDE, run `./gradlew idea` or `./gradlew eclipse` beforehand.
19+
20+
#### Useful Make commands
21+
22+
These commands can be executed from the project root:
23+
24+
- `make fmt` or `./gradlew spotlessApply`: apply code format.
25+
- `make test` or `./gradlew test`: run unit tests.
26+
27+
#### Installation
28+
29+
To install the API client library to your local Maven repository, simply execute:
30+
31+
```bash
32+
./gradlew publishToMavenLocal
33+
```
34+
35+
### Repository structure
36+
37+
The STACKIT Java SDK service submodules are located under `services`.
38+
The files located in `services/[service]` are automatically generated from the [REST API specs](https://github.com/stackitcloud/stackit-api-specifications), whereas the ones located in subfolders (like `wait`) are manually maintained. Therefore, changes to files located in `services/[service]` will not be accepted. Instead, consider proposing changes to the generation process in the [Generator repository](https://github.com/stackitcloud/stackit-sdk-generator).
39+
40+
Inside the `core` submodule you can find several classes that are used by all service modules. Examples of usage of the SDK are located in the `examples` directory.
41+
42+
## Code Contributions
43+
44+
To make your contribution, follow these steps:
45+
46+
1. Check open or recently closed [Pull Requests](https://github.com/stackitcloud/stackit-sdk-java/pulls) and [Issues](https://github.com/stackitcloud/stackit-sdk-java/issues) to make sure the contribution you are making has not been already tackled by someone else.
47+
2. Fork the repo.
48+
3. Make your changes in a branch that is up-to-date with the original repo's `main` branch.
49+
4. Commit your changes including a descriptive message.
50+
5. Create a pull request with your changes.
51+
6. The pull request will be reviewed by the repo maintainers. If you need to make further changes, make additional commits to keep commit history. When the PR is merged, commits will be squashed.
52+
53+
## Bug Reports
54+
55+
If you would like to report a bug, please open a [GitHub issue](https://github.com/stackitcloud/stackit-sdk-java/issues/new).
56+
57+
To ensure we can provide the best support to your issue, follow these guidelines:
58+
59+
1. Go through the existing issues to check if your issue has already been reported.
60+
2. Make sure you are using the latest version of the SDK modules, we will not provide bug fixes for older versions. Also, latest versions may have the fix for your bug.
61+
3. Please provide as much information as you can about your environment, e.g. your version of Java, your version of the SDK modules, which operating system you are using and the corresponding version.
62+
4. Include in your issue the steps to reproduce it, along with code snippets and/or information about your specific use case. This will make the support process much easier and efficient.
63+

README.md

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,65 @@
88
# STACKIT SDK for Java (BETA)
99

1010
[![GitHub License](https://img.shields.io/github/license/stackitcloud/stackit-sdk-java)](https://www.apache.org/licenses/LICENSE-2.0)
11+
[![CI/CD](https://github.com/stackitcloud/stackit-sdk-java/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/stackitcloud/stackit-sdk-java/actions/workflows/ci.yaml)
1112

1213
This repository contains the STACKIT SDKs for Java.
1314

14-
## Reporting issues
15+
## Getting started
1516

16-
If you encounter any issues or have suggestions for improvements, please open an issue in the repository or create a ticket in the [STACKIT Help Center](https://support.stackit.cloud/).
17+
Requires Java 8 or higher.
1718

18-
## Development
19+
The release artifacts of the STACKIT Java SDK are available on [Maven Central](https://central.sonatype.com/namespace/cloud.stackit.sdk).
20+
See below how to use them in your Java project.
1921

20-
Building the STACKIT Java SDK requires:
21-
1. Java SDK (version 11 to 21 should be supported) installed on your system
22+
### Maven
2223

23-
In case you want to open the project in your preferred IDE, run `./gradlew idea` or `./gradlew eclipse` beforehand.
24+
Add the dependencies for the services you want to interact with to your project's POM, e.g. `iaas` and `resourcemanager` (replace `<SDK_VERSION>` with the latest version of each SDK submdoule):
25+
26+
```xml
27+
<dependency>
28+
<groupId>cloud.stackit.sdk</groupId>
29+
<artifactId>iaas</artifactId>
30+
<version><SDK_VERSION></version>
31+
<scope>compile</scope>
32+
</dependency>
33+
<dependency>
34+
<groupId>cloud.stackit.sdk</groupId>
35+
<artifactId>resourcemanager</artifactId>
36+
<version><SDK_VERSION></version>
37+
<scope>compile</scope>
38+
</dependency>
39+
```
2440

25-
## Installation
41+
### Gradle
2642

27-
To install the API client library to your local Maven repository, simply execute:
43+
Add the dependencies to your project's build file (replace `<SDK_VERSION>` with the latest version of each SDK submdoule):
2844

29-
```bash
30-
./gradlew publishToMavenLocal
45+
```groovy
46+
repositories {
47+
mavenCentral()
48+
}
49+
50+
dependencies {
51+
// add the dependencies of the services you want to interact with here,
52+
// e.g. "iaas" and "resourcemanager"
53+
implementation "cloud.stackit.sdk:iaas:<SDK_VERSION>"
54+
implementation "cloud.stackit.sdk:resourcemanger:<SDK_VERSION>"
55+
}
3156
```
3257

58+
## Examples
59+
60+
Examples on services, configuration and authentication possibilities can be found in the [examples folder](https://github.com/stackitcloud/stackit-sdk-java/tree/main/examples).
61+
62+
## Reporting issues
63+
64+
If you encounter any issues or have suggestions for improvements, please open an issue in the repository or create a ticket in the [STACKIT Help Center](https://support.stackit.cloud/).
65+
66+
## Contribute
67+
68+
Your contribution is welcome! For more details on how to contribute, refer to our [Contribution Guide](./CONTRIBUTION.md).
69+
3370
## Release creation
3471

3572
See the [release documentation](./RELEASE.md) for further information.

0 commit comments

Comments
 (0)