This page will help you create and build your first SeedStack application.
Using the generator
Using the SeedStack generator is the easiest way to start building a new SeedStack application. It allows you to select the type of project you want to create and, by answering a few questions, generate a fully operational application.
Assuming that you have Maven installed, run the following command:
mvn -U org.seedstack:seedstack-maven-plugin:generate
web project type. Then just press enter each time the generator asks a question. It will use the default
Run the application
To run the Web application, use the
watch goal. It will watch source folders and when something change trigger a
recompile and an application refresh. Run the following command:
Then, in your favorite browser, go to
http://localhost:8080/hello. It should display the «Hello World!» string.
You can terminate the application gracefully with
watch goal supports the LiveReload protocol to automatically reload the browser page when
the application change. You must install and activate a LiveReload extension for you browser to make it work.
You can also run the application without hot-reloading with the
Modify the application
Now that you have successfully run the application, let’s modify it. The «Hello World!» text is generated by a REST
resource located in the
- Change the text returned by the
hello()method to something else.
- Save the file.
- The application should be refreshed.
- If you enabled the LiveReload extension (see above), the browser page should refresh automatically.
Congratulations! You’ve just successfully run and modified your first SeedStack application.
SeedStack comes with full dependency-management so you never have to specify individual component version.
This is done with a Maven BOM imported in the POM of the project:
<dependencyManagement> <dependencies> <dependency> <groupId>org.seedstack</groupId> <artifactId>seedstack-bom</artifactId> <version>17.11.3</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
You can package the application with the following command:
mvn clean package
SeedStack automatically packages the application in a one-JAR capsule. After the build, this
capsule is located into the
It is a self-executable JAR you can run with the following command:
java -jar target/my-web-project-capsule.jar
If you want to use a Java IDE, just import the generated project as you would do with any Maven project.
To run the application directly from the IDE, create a «Run configuration» for a standalone Java application, and
org.seedstack.seed.core.SeedMain main class.
Now what ?
On this page you have learned:
- How to create a SeedStack project from scratch using the generator.
- How to run the project in hot-reloading mode.
If you can’t get this to work, check the troubleshooting page.
If you want to learn more, continue on the tutorial to learn the basics.