Create a simple module
Developing a module for Hostinger can be an exciting and rewarding task. Here's a step-by-step guide to help you get started:
Workspace Setup
Create Maven or Gradle Projekt.
Add Library to a pom or build file.
Maven
<dependency> <groupId>de.bytestore.hostinger</groupId> <artifactId>core</artifactId> <version>2.5.0</version> <!-- USING PLAIN (Lite without compiled Frontend) --> <classifier>plain</classifier> <exclusions> <exclusion> <groupId>com.vaadin</groupId> <artifactId>vaadin-bom</artifactId> </exclusion> </exclusions> </dependency>Gradle
implementation 'de.bytestore.hostinger:core:2.5.0:plain'Import Maven or Gradle Dependencies.
Module Structure
Hostinger uses the Jmix Plugin Addon, which is based on PF4J Framework to load plugins, so if anything is unclear, you can look at their documentation.
Create your package in the following format (xx.xx.hostinger. modulename) -> For example, de.bytestore.hostinger.docker
Following names for sub packages should be used:
Name
Description
service
Contains your Spring Service Classes.
entity*
Contains your JPA Objects.
configurations
Contains your Spring Configuration Classes.
roles
Contains your JMIX Role / Group definitions
settings*
Contains your App Settings definitions
view*
Contains your JMIX View Classes
*Custom JPA Changelog generation is currently not supported for Modules :(
Create your first Main Class in the format (NameModule.class) and extend it was Plugin -> For example, DockerModule.java.
package de.bytestore.hostinger.docker; import org.pf4j.Plugin; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class DockerModule extends Plugin { Logger logger = LoggerFactory.getLogger(DockerModule.class); @Override public void start() { // This message will be loaded if Hostinger starts your Module. logger.info("Starting..."); } @Override public void stop() { // This message will be loaded if Hostinger stops your Module. logger.info("Stopping..."); } @Override public void delete() { // This message will be loaded if Hostinger deletes your Module. logger.info("Deleting..."); } }Define your Module definition file so that hostinger can load it, create an Manifest File with the following content:
Manifest-Version: 1.0 Plugin-Class: de.bytestore.hostinger.docker.DockerModule Plugin-Id: docker Plugin-Provider: Max Mustermann Plugin-Version: 1.0.0For more information, there's a PF4J docs' page describing the descriptor file.
Troubleshooting:
No Extensions getting found?
Please enable Annotations for your Project. see PF4J Troubleshooting

If you use Gradle, please add the following to your build.gradle.