Skip to content
Michael Bayne edited this page Oct 29, 2018 · 9 revisions

Integrating Getdown into your build.

As described in the quick start documentation, it is necessary to invoke the digester to create a digest.txt file when building your application deployment. This can be done as a part of your app build.

Maven Integration

A Maven plugin exists which handles the creation of the entire appdir based on the configuration in your pom.xml. See the plugin's project page for details on configuring it.


Another Maven plugin exists that just generates the digest.txt from a Maven build.

You must ensure that a getdown.txt file is copied to the target (or specified appdir) directory during the build process. Then setup the plugin as shown below:

<plugin>
  <groupId>org.bitbucket.joxley</groupId>
  <artifactId>getdown-maven-plugin</artifactId>
  <version>0.0.1</version>
  <configuration>
    <appdir>target/app</appdir> <!-- Defaults to target -->
  </configuration>
  <executions>
    <execution>
      <phase>package</phase>
      <goals>
        <goal>digest</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Ant Integration

Getdown provides an Ant task to generate a digest.txt file. We will assume that you have an Ant target that prepares your application deployment directory by copying in the getdown.txt file and your application's jar files and any other resources that are needed. We'll also assume that directory is referenced by ${app_build_dir} in your Ant file.

Maven Ant Tasks

If you use the Maven Ant tasks to obtain dependencies for your build, you can avoid downloading the jar files manually, and instead obtain Getdown via Maven. This is done as follows (replace X.Y with the desired Getdown version):

<artifact:dependencies pathId="getdown.classpath">
  <dependency groupId="com.threerings.getdown" artifactId="getdown-ant" version="X.Y"/>
</artifact:dependencies>
<taskdef name="digest" classname="com.threerings.getdown.tools.DigesterTask"
         classpathref="getdown.classpath"/>
<digest appdir="${app_build_dir}"/>

Manual Dependencies

If you manage your dependencies manually, you can simply download getdown-ant-X.Y.jar from Maven Central and put it somewhere accessible to your build system.

Then use the following Ant code to create your digest file:

<taskdef name="digest" classname="com.threerings.getdown.tools.DigesterTask"
         classpath="path/to/getdown-ant-X.Y.jar"/>
<digest appdir="${app_build_dir}"/>
Clone this wiki locally