It appears that in this case the CodeSonar analysis project file has been saved to some `workdir` location via a python script. My guess is that this `workdir` location is not in the Jenkins working directory, so the plugin cannot automatically find it. The `aid` parameter was added to the plugin in order to work-around cases like this, and it appears that the user has indeed found a work-around which uses the `aid` parameter.
I think the comment that the "jenkins server and the codesonar analysis is performed on two different machines" is not exactly a correct assessment of the situation. Rather I think the problem is that the project search is happening in a directory that does not contain the analysis project file, so the project file will not be found. In terms of the implementation, this is expected behavior, although I recognize that it is not what the user might expect.
In version 3.3.0, we added a new `projectFile` parameter so that users can tell the CodeSonar plugin exactly where their CodeSonar analysis project file is saved. If you use this new `projectFile` parameter, you can avoid using the `aid` parameter as long as the CodeSonar plugin is invoked within the context of the same agent as that which performed the analysis.
I don't think there is anything to fix. Thank you for proposing a work-around and for documenting this issue.
Workaround:
Save aid in a file.
Then in jenkins pipeline