1
Hello,
I have an automation project with Selenium + java + Maven integrated into Jenkins. Today I did a refactor on it moving some classes to new packages.
In my machine there is no problem of compilation or execution, everything runs normal. But in Jenkins, which is on another machine, when I will run this project (always calling mvn clean install) it is giving Noclassdeffounderror to one of the classes I changed package.
As I am new in java I went to take a look to understand all this, I saw some people saying to add the class in the classpath, I saw the explanations about compilation and runtime, etc. I do not understand why, on my machine did not give error at runtime also.
I would like to know how to fix this. When I edit the classpath do I not point out the class path on my machine? Since Jenkins downloads the git project and runs on another machine, how would that work?
If someone can explain me the best solution to fix this error, because I don’t know how to work the classpath. How this happened when I made a refactor of Packages there is no way to reset these invalid references?
Thank you!