Ensure your Java project (either Maven or Gradle) is hosted on GitHub. For this experiment, we will use the following public example repositories:
https://github.com/devops-ds/your-maven-project.githttps://github.com/devops-ds/your-gradle-project.gitNote: You are welcome to use your own GitHub repository if you prefer. If you use the links provided above, you will not need to configure credentials as they are public repositories, and the default branch to build is main.
Make sure your project has a build file (pom.xml for Maven or build.gradle/build.gradle.kts for Gradle) that can compile your code and generate JUnit test reports (typically XML files).
Open your web browser and go to your Jenkins instance (e.g., localhost:8080). Log in with the administrator credentials you created during the initial setup.
Maven-GitHub-Freestyle or Gradle-GitHub-Freestyle).