Skip to content

Resolve Maven artifacts

Use rvs to select the Ravenstash repository and supply temporary credentials to the build tool.

Use rvs to run a Maven build with temporary Ravenstash settings:

Terminal window
rvs art select platform/releases
rvs mvn verify

To fetch one coordinate directly into the local Maven cache:

Terminal window
rvs art select platform/releases
rvs mvn dependency:get -Dartifact=com.acme:internal-sdk:1.2.3

The generated Ravenstash settings are temporary and removed after the invocation.

Declare dependencies normally in the project:

pom.xml
<dependency>
<groupId>com.acme</groupId>
<artifactId>internal-sdk</artifactId>
<version>1.2.3</version>
</dependency>

Ravenstash supports Gradle through the Maven package format, but rvs does not currently include an rvs gradle command. Use rvs mvn for the simplest setup. If the project requires Gradle, follow temporary credential setup and test the exact Gradle version used by your team.

Run the build with a clean dependency cache when practical and inspect client output to confirm the selected Ravenstash repository supplied the dependency.

For a build that cannot use rvs mvn, mint a short-lived read token:

Terminal window
RVS_NATIVE_TOKEN=$(rvs art token mint \
--target platform/releases \
--format maven \
--access read)
export RVS_NATIVE_TOKEN

Copy the current download address from Ravenstash. The examples below use:

https://maven.rvsta.sh/platform/releases/

Print the current addresses or generate a complete read-only Maven recipe:

Terminal window
rvs art endpoint --target platform/releases --format maven
rvs art native config mvn --target platform/releases --access read

endpoint only prints addresses. native config prints Maven configuration and commands without writing files, minting a token, or running Maven.

Configure credentials in Maven settings:

~/.m2/settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0">
<servers>
<server>
<id>ravenstash-read</id>
<username>rvs</username>
<password>${env.RVS_NATIVE_TOKEN}</password>
</server>
</servers>
</settings>

Use the same server ID for the repository in pom.xml:

pom.xml
<repositories>
<repository>
<id>ravenstash-read</id>
<url>https://maven.rvsta.sh/platform/releases/</url>
</repository>
</repositories>
Terminal window
mvn dependency:resolve

For the Kotlin DSL:

build.gradle.kts
repositories {
maven {
url = uri("https://maven.rvsta.sh/platform/releases/")
credentials {
username = "rvs"
password = System.getenv("RVS_NATIVE_TOKEN")
}
}
}

Run the project’s normal Gradle resolution task. Keep the token out of project files and logs. See Use tokens with package tools for expiry, access, and rotation details.