I use maven to build project and do static analysis of code.
However when I run those command in Jenkins job, reuslt is different.
Locally
$ mvn emma:emma pmd:cpd pmd:pmd javadoc:javadoc
Then I get
target\site 
In Jenkins job, Build section, Goals and options
emma:emma pmd:cpd pmd:pmd javadoc:javadoc
Run into error, because target\site\emma folder with reports is missing.
...
Emma: looking for coverage reports in the entire workspace: /home/jenkins/jenkins-home/workspace/Atlas_Master_Maven
Emma: no coverage files found in workspace. Was any report generated?
Build step 'Record Emma coverage report' changed build result to FAILURE
...
Local is Windows 7 64x, remote Jenkins is CentOS. Both have maven 3.0.4.
Why is this happening, and how to get the same result in Jenkins?
Looking carefully at Jenkins job output, I found that Unit test where not executed, so emma had no data to proceed. Thanks @eis. Yep, there’s no magic.