In AbstractSourceJarMojo.createArchiver(), the shared archive resources directory is identified using endsWith:
if (r.getDirectory().endsWith("maven-shared-archive-resources")) {
addDirectory(
archiver.getArchiver(),
Paths.get(r.getDirectory()),
getCombinedIncludes(null),
getCombinedExcludes(null));
}
A resource directory with a path like /path/tmp-maven-shared-archive-resources-extra or /var/lib/maven-shared-archive-resources-backup would falsely match. This should use exact filename matching (e.g., check the last path segment with Paths.get(r.getDirectory()).getFileName().toString()).
In
AbstractSourceJarMojo.createArchiver(), the shared archive resources directory is identified usingendsWith:A resource directory with a path like
/path/tmp-maven-shared-archive-resources-extraor/var/lib/maven-shared-archive-resources-backupwould falsely match. This should use exact filename matching (e.g., check the last path segment withPaths.get(r.getDirectory()).getFileName().toString()).