I set up a very simple test maven project with only a dependency to testNG.
Depending on how I build this, the call either returns null or the expected directory. How is that?
Note that the second call includes "./" after -f.
I actually want to find out the /target folder regardless of scenario (testNG in IntelliJ, Maven, Jenkins Buid, ...). So far, this way has proven the most reliable.
This seems to reliably point to file:/C:/workspace/test/testproject/target/test-classes/com/testproject/test. Would this be safer to use?