Imagine working on a code or configuration following the official documentation to the letter. Yet you keep getting errors. After hours of trials, you can no longer fathom what is wrong.

Instead of adding more, why not try removing?

Existing configurations, libraries, or even codes might be interfering with what you're trying to do.

A few days back, I was struggling to run a testNG Java project with Maven on an Azure Pipeline. At best, there was always either a null or Java Lang exception. Nevertheless, I tried all possible variations from the official docs. I've also navigated through multiple answers on StackOverflow. In fact, I grew even more confused.

Sitting back and reflecting on my work, I tried checking if there might be something causing this situation. For me at this point, it didn't seem that the wrong Java, JDK or Maven version might be causing any trouble.

So I went back to the project starting point, the pom.xml file which was also the configurations location I was most at eased. My hypothesis was that maybe there was other settings overriding the default ones. The Maven SureFire plugin was being used. I also found though, the SureFire plugin was called twice more below with settings I didn't understand.

Twice Villain from My Hero Academia 

I just commented these sections, committed on the remote branch and launched the build again. Hola. It worked. No more exceptions. The tests I included ran as they did locally.