My code structure is as follows :
events
messages
other-code
functional-tests
In the build script for jacoco,
To include multiple class directories by changing the Jenkins JaCoCo plugin configuration, you would need to modify the 'Path to class directories' field.
For instance, if you want to include any classes under the directories 'events' and 'other-code', you would add the following to the 'Path to class directories' section:
**/events,**/other-code
Keep in mind that if you want to add multiple directories, you have to separate each one by a comma and there can be no spaces (due to a bug with the plugin). Note: this comma bug is true of all text fields in this plugin configuration.
Here is my working JaCoCo plugin configuration:
EDIT: As mentioned in comments, one solution to this problem is to utilize whatever build tool you are dealing with (Ant, Maven, Gradle) to drop the target
(ie: jar, war, etc.) into a common directory and just point the jacoco plugin there.