in src/main/java/org/apache/sling/feature/maven/mojos/apis/RegionSupport.java [305:337]
public String calculateOmitDependenciesFlag(
final ApiRegion region,
final Clause[] exportedPackageClauses,
final Set<Clause> usedExportedPackagesPerRegion) {
// check whether all packages are exported in this region
String reason = null;
for (final Clause c : exportedPackageClauses) {
boolean found = false;
for (final Clause current : usedExportedPackagesPerRegion) {
if (current.getName().equals(c.getName())) {
found = true;
break;
}
}
if (!found) {
final String msg = "Package ".concat(c.getName()).concat(" not exported.");
reason = reason == null ? msg : reason.concat(" ").concat(msg);
} else {
// check deprecation - if deprecation is set, artifact can't be used as a
// dependency
final ApiExport exp = region.getAllExportByName(c.getName());
if (exp != null
&& (exp.getDeprecation().getPackageInfo() != null
|| !exp.getDeprecation().getMemberInfos().isEmpty())) {
final String msg = "Package (or parts) ".concat(c.getName()).concat(" marked as deprecated.");
reason = reason == null ? msg : reason.concat(" ").concat(msg);
}
}
}
return reason;
}