You can quickly get started building a Stateful Functions applications by adding the
statefun-sdk to an existing project or using the provided maven archetype.
This allows you to name your newly created project. It will interactively ask you for the groupId, artifactId, and package name. There will be a new directory with the same name as your artifact id.
The project contains four files:
pom.xml: A pom file with the basic dependencies to start building a Stateful Functions application.
Module.java: The entry point for the application.
org.apache.flink.statefun.sdk.spi.StatefulFunctionModule: A service entry for the runtime to find the module.
Dockerfile: A Dockerfile to quickly build a Stateful Functions image ready to deploy.
We recommend you import this project into your IDE to develop and test it. IntelliJ IDEA supports Maven projects out of the box. If you use Eclipse, the m2e plugin allows to import Maven projects. Some Eclipse bundles include that plugin by default, others require you to install it manually.
If you want to build/package your project, go to your project directory and run the
mvn clean package command.
You will find a JAR file that contains your application, plus any libraries that you may have added as dependencies to the application: