I’ve set one project that is running well on my machine, but at the circleci env it fails with a NPE caused by a java statement trying to get a test resource inside the building jar that will be used to compare.
Which of your methods resolves unexpectedly to null? At a minimum, you should trap that and output a sensible error, rather than letting it get to an NPE.
If you don’t know whether getClass() or getResource() is returning null, I’d say the first step is to find out . The defensive programming I suggested earlier would be ideal.
Well, embarrassingly, after many many hours, I found where the issue was…
The culprit was a copied .gitignore file that contained this:
# Package Files #
target
*.jar
*.txt
Eclipse IDE adds a small interrogation icon on the uncommited files, a small repo icon to the committed ones and just remove the icon from the ignored ones. I just didn’t pay attention to those ignored ones.