Maven Dependency: First understand the problem then fix it

It is a bit complex, If you are building a maven project the first time. In my case, I spent a lot of time setting up my first maven project. While building the project, If I got some error, then I search the error in StackOverflow, find a solution, apply it. Sometime it will work and sometimes it won't. I am just applying the StackOverflow recommended solution without understanding it. But later, I realize this is why I took a lot of time to fix a problem. First, I understand the problem before fixing it. This saved a lot of time from fixing the problem