This project contains a Maven archetype for modular GWT projects using Spring Boot. The repo is based on the implementation of Thomas Broyer's gwt-maven-archetypes.
If you are looking for the original archetype creator or would prefer another backend/implementation, please visit: gwt-maven-archetypes.
mvn archetype:generate -DarchetypeGroupId=com.github.nalukit.archetype -DarchetypeVersion=LATEST -DarchetypeArtifactId=<artifactId>
where the available <artifactIds>
is:
clean-modular-springboot-webapp
modular-springboot-webapp
This should use the latest release from the Central Repository.
📝 Maven 2.2 or later is required.
Generates a clean Spring Boot multi Maven module project without any example code. If you need a clean approach, this is the best way to start.
The generated project will use the following version:
- Java 17
- GWT 2.12.0
- Spring Boot 3.3.5
Generates a Spring Boot multi Maven module project with any example code. The example is similar to the one from the GWT project.
The generated project will use the following version:
- Java 17
- GWT 2.11.0
- Spring Boot 3.2.5
Change directory to your generated project and issue the following commands:
- In one terminal window:
mvn gwt:codeserver -pl *-client -am
- In another terminal window:
mvn spring-boot:run -pl *-server -am
📝 The
-pl
and-am
are not strictly necessary, they just tell Maven not to build the client module when you're dealing with the server one, and vice versa.
Once both are server are running, enter http://localhost:8080 in a browser window.
📝 Both servers are running when the code server outputs
The code server is ready at http://127.0.0.1:9876/
and the Spring Boot server outputsStarted Application in xxx seconds
.
After you have generated your project from the above steps, you can create a release build and test it works.
Change directory to your generated project and issue the following commands:
mvn clean package
cd *-server/target
java -jar myapp.war
📝 Replace
myapp.war
with the name of your war file.
Open http://localhost:8080 in a browser window to test your release build.
If you want to hack on / contribute to the archetypes, you can:
git clone https://github.com/NaluKit/gwt-maven-springboot-archetype
cd gwt-maven-springboot-archetype
Make your changes, and run:
mvn clean verify
This will generate sample apps that can be found in both the clean-modular-springboot-webapp
and
modular-springboot-webapp
directories, in the target/test-classes/projects/basic-webapp/project/basic-webapp
directory.
You can also install your modified version of the project locally:
mvn clean install
Then use the mvn archetype:generate
command from above, except for the -DarchetypeVersion
argument which you'll
replace with HEAD-SNAPSHOT
.
Please visit use us at Nalu Gitter room.