Java 21 web application packaged as a WAR, without Spring, using Servlet API + JAX-RS (Jakarta EE), deployable on Tomcat , with Checkstyle, unit tests, and Maven build.
Check outdated dependencies
mvn versions:display-dependency-updates
mvn versions:display-plugin-updatesRun Checkstyle to enforce code style rules:
mvn checkstyle:check⛔️ Build fails if code does not comply with checkstyle.xml.
Run tests and generate JaCoCo coverage report:
mvn clean test
mvn jacoco:reportCoverage report generated at:
target/site/jacoco/index.html
Compile, test, and package as a WAR file:
mvn clean installGenerates:
target/backend-java-1.0.0.war
- Copy the WAR file to:
<tomcat-path>/webapps
-
Start Tomcat
-
Access the application:
mvn clean
mvn compile
mvn verify
mvn package
mvn test
mvn install
mvn checkstyle:check
mvn dependency:tree
mvn clean test
mvn jacoco:reportmvn clean install
cp target/backend-java-1.0.0.war <TOMCAT_PATH>/webapps
# Start TomcatApplication available at:
http://<server>:8080/backend-java-1.0.0/
