A classic Java Web application project mixing backend Java classes and frontend static resources. This projects uses the W20 framework to provide a sample UI, but you can easily change it.
You need to have Apache Maven 3.1+ installed. To create a Java Web application project from scratch, execute the following command:
mvn org.seedstack:seedstack-maven-plugin:generate -Dtype=web
After execution, a single module project is created:
- myservice |- src |- main | |- java | | |- org.myorg.myservice | | |- [application] <-- application logic | | |- [domain] | | | |- [model] <-- domain model | | | |- [services] <-- domain services | | |- [infrastructure] <-- technical infrastructure | | |- rest <-- REST resources and representations | |- resources | |- META-INF | |- configuration <-- main configuration | |- [resources] <-- frontend static resources |- test |- java |- resources |- META-INF |- configuration <-- test configuration
Note that the directory in brackets are not created by the archetype. They are the recommended locations if you need to add any business domain or static resources to your project. You can also choose to put the domain in a separate domain module.
Conversion to WAR
This project is designed to be run from the command-line with its embedded Web server. To convert it to a classic WAR, see this guide.