in src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java [464:472]
protected void addDirectory(Archiver archiver, Path sourceDirectory, String[] pIncludes, String[] pExcludes)
throws MojoException {
try {
getLog().debug("add directory " + sourceDirectory + " to archiver");
archiver.addFileSet(DefaultFileSet.fileSet(sourceDirectory.toFile()).includeExclude(pIncludes, pExcludes));
} catch (ArchiverException e) {
throw new MojoException("Error adding directory to source archive.", e);
}
}