This is the Maven repository for your Stainless Java SDK build.
-To use the uploaded Maven repository, add the following to your project's pom.xml:
The details depend on whether you're using Maven or Gradle as your build tool.
+ +Add the following to your project's pom.xml:
<repositories>
+ <repository>
+ <id>stainless-sdk-repo</id>
+ <url>https://pkg.stainless.com/s/${PROJECT}/${SHA}/mvn</url>
+ </repository>
+</repositories>
+
+ Add the following to your build.gradle file:
repositories {
+ maven {
+ url "https://pkg.stainless.com/s/${PROJECT}/${SHA}/mvn"
+ }
+}
+
+ Some accounts may require authentication to access the repository. If so, use the
+ following instructions, replacing YOUR_STAINLESS_API_TOKEN with your actual token.
First, ensure you have the following in your Maven settings.xml for repo authentication:
<servers> + <server> + <id>stainless-sdk-repo</id> + <configuration> + <httpHeaders> + <property> + <name>Authorization</name> + <value>Bearer YOUR_STAINLESS_API_TOKEN</value> + </property> + </httpHeaders> + </configuration> + </server> +</servers>+ +
Then, add the following to your project's pom.xml:
<repositories>
<repository>
<id>stainless-sdk-repo</id>
@@ -105,14 +149,24 @@ generate_instructions() {
</repository>
</repositories>
- If you're using Gradle, add the following to your build.gradle file:
Add the following to your build.gradle file:
repositories {
maven {
- url 'https://pkg.stainless.com/s/${PROJECT}/${SHA}/mvn'
+ url "https://pkg.stainless.com/s/${PROJECT}/${SHA}/mvn"
+ credentials(HttpHeaderCredentials) {
+ name = "Authorization"
+ value = "Bearer YOUR_STAINLESS_API_TOKEN"
+ }
+ authentication {
+ header(HttpHeaderAuthentication)
+ }
}
}
+ Once you've added the repository, you can include dependencies from it as usual. See your +
Once you've configured the repository, you can include dependencies from it as usual. See your project README for more details.