More and more (transitive) dependencies we use in our modules tend to be "Multi-release JARs" and include "module-info.class" and "META-INF/versions/..." inside the archives.
BND requires special directives to ignore the Multi-release resources when scanning the JARs otherwise the generated MANIFEST.MF of our module will contain something like this:
1. To ignore META-INF/versions/... you need to add the following to your "bnd.bnd" :
2. To ignore module-info.class the -fixupmessages directive is not enough: : you also need to add
unless we upgrade to BND (see the referenced GitHub issues and FELIX ticket above).
Steps to reproduce
- Edit modules/apps/portal-search-elasticsearch6/portal-search-elasticsearch6-impl/build.gradle
- Change version to "1.61" for
Note: "bcpg-jdk15on-1.61.jar will have a "module-info.class" in its root
- Run gradlew assemble
- Inspect the generated MANIFEST.MF of com.liferay.portal.search.elasticsearch6.impl-*.jar in tools/sdk/dist:
Actual Result: com.liferay.portal.search.elasticsearch6.impl-*.jar#META-INF/MANIFEST.MF contains
Add -noee: true to the end of the bnd.bnd of the elasticsearch6-impl module and rebuild. Now the MANIFEST does not contain the problematic Require-Capability.