Skip to content

Maven Artifact of JRuby (for maven, ivy, buildr, and alike)

Charles Oliver Nutter edited this page Feb 21, 2025 · 7 revisions

JRuby publishes several artifacts to Maven:

  • jruby-dist - the full distribution of JRuby for command-line use.
  • jruby-base - the minimal JRuby jar with all dependencies external.
  • jruby-core - JRuby and all Java dependencies in a single jar (deprecated).
  • jruby-stdlib - the JRuby standard library bundled into a single jar.
  • jruby-complete - a single-jar distribution of JRuby, combining JRuby, all Java dependencies, and the standard library.

We also publish the jruby-jars gem containing -core and -stdlib, for use from Ruby applications.

Use this JRuby tag in examples below to get the latest release: GitHub tag (latest by date)

Adding the jruby-base artifact to your project

<project>
...
  <dependencies>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-base</artifactId>
      <version>[jruby release version]</version>
    </dependency>
...
</project>

For any other build system please see search.maven.org for the correct declaration. there is actually also a org.jruby:jruby:jar which is empty, i.e. it is enough to include the pom artifact.

Using snapshot builds of JRuby

Snapshot builds of the Maven artifacts above are published nightly to the Sonatype Maven Snapshots repository. To use our snapshots, specify https://oss.sonatype.org/content/repositories/snapshots/ as the Maven repository and use the -SNAPSHOT version of the next release (usually, add one to the x.x.y component of our version string).

All published Maven snapshot artifacts can be browsed on the Sonatype Nexus for OSS, or via the Maven XML output provided by the snapshot server: https://oss.sonatype.org/service/local/repositories/snapshots/content/org/jruby/

We attach snapshot builds of the jruby-jars gem to our nightly builds.

Specifying a snapshot repository:

<repositories>
  <repository>
    <id>jruby-snapshots</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    <releases>
      <enabled>false</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>

Now you can specify snapshot versions of any JRuby artifact:

<dependency>
  <groupId>org.jruby</groupId>
  <artifactId>jruby-base</artifactId>
  <version>[next jruby version]-SNAPSHOT</version>
</dependency>

Clone this wiki locally