Prerequisites
Development Environment
For the development of FirstSpirit modules, a Java Development Kit (JDK) is required, and – optionally but highly recommended – an Integrated Development Environment (IDE). Build-tools also help with the creation of artifacts and provide an easy way to manage dependencies to other libraries. Although the use of Apache Maven is possible, Crownpeak recommends using Gradle.
Informationen about supported JDK versionscan be found in the system requirements for the FirstSpirit server in the section “Technical requirements and recommendations (→Documentation for Administrators)”.
FirstSpirit API
The FirstSpirit Access API provides the interface between the self-developed code and FirstSpirit. For this, the integration of a single artifact is necessary.
dependencies {
compileOnly(group = "de.espirit.firstspirit", name = "fs-isolated-runtime", version = "5.2.250311")
}
The chosen version should ideally match the server version on which the code will be executed later. The artifact will be automatically integrated by FirstSpirit in the appropriate version and should therefore not be delivered as part of an FSM.
The aforementioned artifact is not available through public repositories like MavenCentral; therefore, it is essential to configure an additional repository in the build tool. Customers and partners with access to the Cloud Artifactory can use it directly, new versions are automatically provided here. For development without this access, the corresponding Jar is available in the download directory of the FirstSpirit release and can be added to a personal local repository.
Please note that the Jar does not contain only API classes. Elements that are not part of the stable API are annotated with @ApiStatus.Internal. Ideally, the IDE warns during development if a corresponding class or method is used nonetheless. This should definitely be avoided, as the internal structure may change at any time without notice, which may result in the worst case that your module no longer works as intended.
FirstSpirit Module Gradle Plugin
The open-source FirstSpirit Module Gradle Plugin enables easy creation of FirstSpirit modules. For example, it assists in defining custom components, optionally checks for the use of non-API elements, and subsequently generates the FSM file. The project’s README file contains detailed information on setting up the plugin.
Example Modules
Two modules available on GitHub exemplary demonstrate the implementation of various requirements: