in src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java [927:949]
private void postProcessBinDirectory(final ApisJarContext ctx, final ArtifactInfo info, final File dir,
final String pck) {
boolean hasJavaFile = false;
for (final File child : dir.listFiles()) {
if (child.isDirectory()) {
postProcessBinDirectory(ctx, info, child,
pck.isEmpty() ? child.getName() : pck.concat(".").concat(child.getName()));
} else if (child.getName().endsWith(ArtifactType.APIS.getContentExtension())) {
hasJavaFile = true;
}
}
if (dir.listFiles().length == 0 && !pck.isEmpty()) {
// empty dir -> remove
dir.delete();
} else if (!hasJavaFile && info.getUsedExportedPackages().contains(pck)) {
// We need to record this kind of packages and ensure we don't trigger warnings
// for them
// when checking the api jars for correctness.
getLog().debug("No classes found in " + pck);
ctx.getPackagesWithoutJavaClasses().add(pck);
}
}