A minimal Java project showing Apache Maven for build automation and JUnit 5 for unit testing.
- Java 17+
- Maven 3.9+
- (Optional) VS Code + “Extension Pack for Java”
src/main/java/...application codesrc/test/java/...test codepom.xmlMaven config
# compile sources
mvn compile
# run unit tests
mvn test
# package JAR into /target
mvn package
# clean build artifacts
mvn cleanmvn surefire-report:report
# open target/site/surefire-report.html- Open the folder in VS Code.
- Go to the Testing view (beaker icon) → Run All Tests.
- If tests don’t appear:
Ctrl+Shift+P→ Java: Clean Java Language Server Workspace.
- Ensure package names match folders.
- Confirm JUnit 5 dependencies are in
pom.xml. - Java version in
pom.xmlmatches your installed JDK.