Hi!
I have some helpers in my plugin to allow the users to call some utilities in the plugin from their script. It was working since the beginning but I recently realized it was not anymore. When I call them from a job in Jenkins, it fails:
java -cp /var/lib/jenkins/plugins/mathworks-polyspace/WEB-INF/lib/mathworks-polyspace.jar com.mathworks.polyspace.jenkins.PolyspaceHelpers
Error: Could not find or load main class com.mathworks.polyspace.jenkins.PolyspaceHelpers
Caused by: java.lang.ClassNotFoundException: com.mathworks.polyspace.jenkins.PolyspaceHelpers
When I call them from the server command line, it works:
> java -cp /var/lib/jenkins/plugins/mathworks-polyspace/WEB-INF/lib/mathworks-polyspace.jar com.mathworks.polyspace.jenkins.PolyspaceHelpers
Usage: ps_helper -report-filter <original_report> <filtered_report> [<owner>] [<title> <value>]+
Usage: ps_helper -report-status <report> <nb_to_fail>
Usage: ps_helper -report-count-findings <report>
Usage: ps_helper -print-runid <prs upload output>
Usage: ps_helper -print-projectid <prs upload output>
Usage: ps_helper -print-projecturl <prs upload output> <prs_url>
I checked the problem show even with my oldest plugin version which was supposed to work from the beginning. Anything has changed on Jenkins’ side with newer versions? Is there anything recently that forbids calling helpers from a job that way?
Any help understanding what is happening would be welcome!
Stéphane