Everything you need to use citeproc-java has already been prepared for you in the following binary package:

Download citeproc-java 2.0.0 (binaries) JavaDoc Source code

citeproc-java requires Java 8 or higher but I recommend running it with Java 11 or higher to benefit from the new GraalVM JavaScript engine, which provides a much higher performance (see JavaScript engines).

Installing the tool with Homebrew

On macOS, you can install the citeproc-java command line tool with the Homebrew package manager.

brew tap michel-kraemer/citeproc-java
brew install citeproc-java

Running the tool with Docker

A Docker image for the citeproc-java command line tool is available from Docker Hub:

docker run michelkraemer/citeproc-java

Installing the library for development

Download the citeproc-java library from Maven central to include it into your own application.

http://central.maven.org/maven2/de/undercouch/citeproc-java/2.0.0/

The library has dependencies to JBibTeX, ANTLR, Apache Commons Lang, Apache Commons Text, SnakeYAML, and GraalVM JavaScript.

I highly recommend using a build tool such as Maven or Gradle to manage your application dependencies. Add the following snippet to your build file:

<dependencies>
  <dependency>
    <groupId>de.undercouch</groupId>
    <artifactId>citeproc-java</artifactId>
    <version>2.0.0</version>
  </dependency>
</dependencies>
repositories {
    mavenCentral()
}

dependencies {
    compile 'de.undercouch:citeproc-java:2.0.0'
}

Installing CSL Styles and locales

In order to use citeproc-java, you need three things: the library itself, the CSL styles, and the locales. The binary bundle includes everything you need. However, if you don’t use the binary package (e.g. because you’re installing citeproc-java via Maven), you need to download the CSL styles and locales.

Please note that without these files the citeproc-java library alone will be rather useless.

You can download the styles and locales from the following GitHub repositories:

https://github.com/citation-style-language/styles

https://github.com/citation-style-language/locales

For convenience, we provide them as Maven artifacts. Add the following snippet to your build file:

<dependencies>
  <dependency>
    <groupId>org.citationstyles</groupId>
    <artifactId>styles</artifactId>
    <version>20.11</version>
  </dependency>
  <dependency>
    <groupId>org.citationstyles</groupId>
    <artifactId>locales</artifactId>
    <version>20.11</version>
  </dependency>
</dependencies>
repositories {
    mavenCentral()
}

dependencies {
    compile 'org.citationstyles:styles:20.11'
    compile 'org.citationstyles:locales:20.11'
}

The artifacts above represent releases that are updated at irregular intervals. If you need the most up-to-date styles and locales, you may use the following snapshots from the Sonatype OSS repository, which we update daily.

Note: replace the version number 20.11 with the current year and month. For example, 21.2 for February 2021.

<repositories>
  <repository>
    <id>oss-snapshots-repo</id>
    <name>Sonatype OSS Maven Repository</name>
    <url>https://oss.sonatype.org/content/groups/public</url>
    <snapshots>
      <enabled>true</enabled>
      <updatePolicy>always</updatePolicy>
    </snapshots>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>org.citationstyles</groupId>
    <artifactId>styles</artifactId>
    <version>20.11-SNAPSHOT</version>
  </dependency>
  <dependency>
    <groupId>org.citationstyles</groupId>
    <artifactId>locales</artifactId>
    <version>20.11-SNAPSHOT</version>
  </dependency>
</dependencies>
repositories {
    maven {
        url 'https://oss.sonatype.org/content/groups/public'
    }
}

dependencies {
    compile 'org.citationstyles:styles:20.11-SNAPSHOT'
    compile 'org.citationstyles:locales:20.11-SNAPSHOT'
}