The trouble I am facing is:
Say, I have a JAVA code and I intentionally put a syntax error there, then the compilation should make the build fail.
Similarly, if there's no error, the compilation should mark the build as success.
BUT the catch is, I don't want to run the code. I just want this Failure and Success based on compilation
I have written a TestNg code for an automated test and I am using this maven goal in Jenkins:
clean compile test
This starts running the whole test and then brings the error on whichever line it's caught.
But I want to get this error during the compilation without running the test code.