Troubleshooting a Bug In Maven Project

Share via:

Dear Readers,

In this article, we will see the Troubleshooting a Bug In Maven Project.

Steps to Follow

  1. Create a Maven Project.
  2. Create a bug.
  3. Build job “kt-mavenjob.
  4. Verify Console Output of job “kt-mavenjob.
  5. Troubleshoot Maven Project.
  6. Buid job “kt-mavenjob”.
  7. Verify console output of job “kt-mavenjob”.

1. Create a Maven Project

Create Maven Project by using below link.

We can see the job “kt-mavenjob” of the maven project.

This image has an empty alt attribute; its file name is ktexperts-10.png

I am intentionally creating bugs for testing then troubleshoot the bug.

2. Create a bug

Go to the repository “time-tracker” by using below link.
https://github.com/Ramesh-Ktexperts/time-tracker

We can see the repository “time-tracker”

Click on Core.

Click on Src.

Click on main/java/training/tayler/timetracker/core.

Click on the file tracker.java.

Click on Edit button.

Comment 3rd and 4th lines intentionally to create the bug.

Click on commit changes.

The file tracker.java has been updated successfully.

3. Build job “kt-mavenjob”

Go to Jenkins main dashboard,there we can see the job “kt-mavenjob”

give right click on the name of job “kt-mavenjob” and click on Build Now.

We can see the Red ball, which means the job got failed.

4. Verify Console Output of job “kt-mavenjob”

Click on job “kt-mavenjob”.

click on Red Ball.

In the console output,we can see the out put of job “kt-mavenjob”.

5. Troubleshoot Maven Project

Go to the repository “time-tracker” by using below link.
https://github.com/Ramesh-Ktexperts/time-tracker

Click on Core.

Click on Src.

Click on main/java/training/tayler/timetracker/core.

Click on the file tracker.java.

Click on Edit button.

UnComment 3rd and 4th lines to resolve the bug.

Give commit message “Modified” and click on Commit changes.

The file tracker.java has been updated successfully.

6. Buid job “kt-mavenjob”

Go to Jenkins main dashboard there we can see the job “kt-mavenjob” got failed.

Go to job “kt-mavenjob” and click on Build Now.

We can see the green color that means the job has build build succusfully.

7. Verify console output of job “kt-mavenjob”

Click on job “kt-mavenjob”.

Click on green color (#3).

In the console output,we can see the out put of job “kt-mavenjob”

Thank you for giving your valuable time to read the above information.
Follow us on 
Website  www.ktexperts.com
Facebook Page KTexperts
Linkedin Page : KT EXPERTS

Follow Me
Ramesh’s Linkedin : https://www.linkedin.com/in/ramesh-atchala/

 

 

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Add Comment