This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new c41916b SLING-9324 : Improve api jar generation
c41916b is described below
commit c41916b89d4376df94a5624f59ca15921c50f00c
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Thu Apr 9 16:12:36 2020 +0200
SLING-9324 : Improve api jar generation
---
.../java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java
b/src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java
index 325d4f1..214e3dc 100644
--- a/src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java
+++ b/src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java
@@ -501,13 +501,14 @@ public class ApisJarMojo extends
AbstractIncludingFeatureMojo {
}
private void report(final File jarFile, final String apiType, final
ApiRegion apiRegion, final String extension, ApisJarContext ctx) throws
MojoExecutionException {
- final Set<String> excludePackages = APIS.equals(apiType) ?
ctx.getPackagesWithoutJavaClasses() : ctx.getPackagesWithoutSources();
-
final List<String> packages = getPackages(jarFile, extension);
final List<ApiExport> missing = new ArrayList<>();
+
+ // for the report we always use the binaries as the source of truth
+ // that's why we check against getPackagesWithoutJavaClasses()
for (final ApiExport exp : apiRegion.listExports()) {
String packageName = exp.getName();
- if (!packages.remove(packageName) &&
!excludePackages.contains(packageName)) {
+ if (!packages.remove(packageName) &&
!ctx.getPackagesWithoutJavaClasses().contains(packageName)) {
missing.add(exp);
}
}