How to package custom code


You can extend RESTHeart by implementing custom extensions, such as Application Logic Handlers and Request Hooks. As RESTHeart is a Java application, to package custom code you usually use Maven or any Maven-compatible tool, such as Gradle.

A basic knowledge of Maven is required to follow this guide.

RESTHeart is available as a Maven artifact and so it can be included in your own custom POM. Here you can see examples of how to configure dependencies with different build tools.

To add RESTHeart dependency to your pom.xml, just add this:


Create a Uber jar

The Maven Shade plugin provides the capability to package the artifact in an uber-jar, including its dependencies.

The following configuration will produce a single jar file whose name is the artifactId, for instance foo.jar. This jar will include both your custom code and RESTHeart. You can start the customized RESTHeart with:

$ java -server -jar foo.jar conf.yml

Important: RESTHeart is distributed under the AGPL, so you are obliged to distribute the software that use and/or embeds RESTHeart under the AGPL itself. SoftInstigate sells commercial licenses that overcome this limitation.

                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">