Skip to content

Publish Maven artifacts

rvs selects the Maven upload destination and supplies temporary authentication to the build tool.

With rvs, run the project’s normal deployment with temporary access:

Terminal window
rvs art select platform/releases
rvs mvn deploy

For a prepared artifact, use Maven’s deploy-file goal with explicit coordinates:

Terminal window
rvs art select platform/releases
rvs mvn org.apache.maven.plugins:maven-deploy-plugin:3.1.3:deploy-file \
-Dfile=target/internal-sdk-1.2.3.jar \
-DgroupId=com.acme \
-DartifactId=internal-sdk \
-Dversion=1.2.3 \
-Dpackaging=jar

Before publishing, rvs shows the destination and planned files and asks for confirmation. Use rvs mvn --rvs-yes deploy only in a guarded automation job.

Ravenstash supports Gradle through the Maven package format, but rvs does not currently include an rvs gradle command. Projects that require Gradle can use a temporary credential with their existing Gradle repository setup.

Confirm the package, version, POM, artifacts, metadata, and checksum files appear in the Ravenstash repository. Then resolve the exact version through the download host.

To run plain mvn deploy or a Gradle publication task, mint a short-lived publish token:

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

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

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

Print only the upload address or generate a complete Maven publication recipe:

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

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

Configure the publish credential in Maven settings:

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

Use the same server ID in pom.xml:

pom.xml
<distributionManagement>
<repository>
<id>ravenstash-publish</id>
<url>https://push.maven.rvsta.sh/platform/releases/</url>
</repository>
</distributionManagement>
Terminal window
mvn deploy

With the maven-publish plugin and Kotlin DSL:

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

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