Java SDK For Maven and Gradle Users

Java SDK with version 2.0.0 or later, can be added to maven and gradle projects.

Maven

You can add opsgenie repository and sdk as dependency. Example:

<dependencies>
    <dependency>
        <groupId>com.opsgenie.integration</groupId>
        <artifactId>sdk</artifactId>
        <version>[2.0.0,)</version>
    </dependency>
</dependencies>

 
Maven gets the latest version of Java SDK for this configuration. We suggest to use the latest version.

Alternatively, you can use shaded version (independent jar):

<dependencies>
    <dependency>
        <groupId>com.opsgenie.integration</groupId>
        <artifactId>sdk-shaded</artifactId>
        <version>[2.0.0,)</version>
    </dependency>
</dependencies>


Gradle

You can add opsgenie repository and sdk as dependency. Example:

 
dependencies {
    compile "com.opsgenie.integration:sdk:2+"
}
Gradle gets the latest version of Java SDK for this configuration. We suggest to use the latest version.

Alternatively, you can use shaded version (independent jar):

dependencies {
    compile "com.opsgenie.integration:sdk-shaded:2+"
}