https://guides.gradle.org/building-java-web-applications/
$ sudo apt install default-jre default-jdk
$ java --version
$ javac --version
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
$ sudo echo 'JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/bin/"' >> /etc/environment
$ curl -s "https://get.sdkman.io" | bash
$ sdk version
SDKMAN 5.7.4+362
$ sdk install gradle 6.3
https://docs.gradle.org/4.10.3/userguide/war_plugin.html
mkdir -p webdemo/src/main/java
mkdir -p webdemo/src/main/webapp
mkdir -p webdemo/src/test/java
$ touch webdemo/build.gradle.kts
$ gradle wrapper --gradle-version=6.3
- Add a servlet and metadata to the project
- JSP pages to the demo application
- Add
gretty
plugin and run the app
$ ./gradlew test
$ ./gradlew build