Weird, that's the full META-INF/MANIFEST.MF of that JAR as deployed to Maven Central:
That's weird indeed, I just checked again by downloading directly and it actually does not contain those headers when I try it:
Does this mean that Felix doesn't really support fragments at all? Or is there a way to mandate the order of resolution?
It seems to support them as long as the fragment is resolved first. I could of course try what the latest version does, but 4.x (from 2013, which incidentally is what GlassFish 5 is using as well) didn't work. Perhaps with the Require-Capability and Provide-Capability you can essentially have the host "import" the fragment, but that begs the question why a fragment should be used at all if the host has (indirectly) knowledge of it.
Maybe it's related to your statement above that you don't see any OSGi headers in the CDI module at all?
It's only hibernate-validator-cdi-6.0.1.Final.jar that doesn't seem to have the OSGi headers. All other versions and all versions of hibernate-validator-xyz.jar do have those headers. The modified hibernate-validator-cdi.jar manifest that worked for me is as follows: (I tested last with 6.0.0.CR3)
For hibernate-validator.jar it's:
Manifest-Version: 1.0
Implementation-Title: hibernate-validator
Bundle-Description: Hibernate's Bean Validation (JSR-380) reference im
plementation.
Automatic-Module-Name: org.hibernate.validator
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-SymbolicName: org.hibernate.validator.hibernate-validator
Implementation-Version: 6.0.0.CR3
Built-By: jenkins
Bnd-LastModified: 1499786175488
Bundle-ManifestVersion: 2
Implementation-Vendor-Id: org.hibernate.validator
Specification-Title: Bean Validation
Import-Package: javax.persistence;version="[2.0.0,3.0.0)";resolution:=
optional,javax.validation;version="[2.0.0,3.0.0)",javax.validation.co
nstraints;version="[2.0.0,3.0.0)",javax.validation.constraintvalidati
on;version="[2.0.0,3.0.0)",javax.validation.executable;version="[2.0.
0,3.0.0)",javax.validation.groups;version="[2.0.0,3.0.0)",javax.valid
ation.metadata;version="[2.0.0,3.0.0)",javax.validation.spi;version="
[2.0.0,3.0.0)",javax.validation.valueextraction;version="[2.0.0,3.0.0
)",javax.xml.bind;version=0,javax.xml.bind.annotation;version=0,javax
.xml.bind.annotation.adapters;version=0,javax.xml.namespace;version=0
,javax.xml.stream;version=0,javax.xml.stream.events;version=0,javax.x
ml.stream.util;version=0,javax.xml.transform;version=0,javax.xml.tran
sform.stream;version=0,javax.xml.validation;version=0,javax.el;versio
n="[2.0.0,4.0.0)";resolution:=optional,org.xml.sax;version=0,org.jbos
s.logging;version="[3.1.0,4.0.0)",com.fasterxml.classmate;version="[1
.3.1,2.0.0)",com.fasterxml.classmate.members;version="[1.3.1,2.0.0)",
org.joda.time;version="[2.0.0,3.0.0)";resolution:=optional,org.jsoup;
version="[1.5.2,2.0.0)";resolution:=optional,org.jsoup.nodes;version=
"[1.5.2,2.0.0)";resolution:=optional,org.jsoup.parser;version="[1.5.2
,2.0.0)";resolution:=optional,org.jsoup.safety;version="[1.5.2,2.0.0)
";resolution:=optional,org.jsoup.select;version="[1.5.2,2.0.0)";resol
ution:=optional,javax.money;version="[1.0.0,2.0.0)";resolution:=optio
nal,com.thoughtworks.paranamer;version="[2.5.5,3.0.0)";resolution:=op
tional
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Tool: Bnd-3.2.0.201605172007
Implementation-Vendor: org.hibernate.validator
Export-Package: org.hibernate.validator;version="6.0.0.CR3";uses:="jav
ax.validation,javax.validation.spi,javax.validation.valueextraction,o
rg.hibernate.validator.cfg,org.hibernate.validator.spi.resourceloadin
g",org.hibernate.validator.cfg;version="6.0.0.CR3";uses:="javax.valid
ation,org.hibernate.validator.cfg.context",org.hibernate.validator.cf
g.context;version="6.0.0.CR3";uses:="javax.validation,org.hibernate.v
alidator.cfg,org.hibernate.validator.spi.group",org.hibernate.validat
or.cfg.defs;version="6.0.0.CR3";uses:="javax.validation.constraints,o
rg.hibernate.validator.cfg,org.hibernate.validator.constraints,org.hi
bernate.validator.constraints.time",org.hibernate.validator.cfg.defs.
br;version="6.0.0.CR3";uses:="org.hibernate.validator.cfg,org.hiberna
te.validator.constraints.br",org.hibernate.validator.cfg.defs.pl;vers
ion="6.0.0.CR3";uses:="org.hibernate.validator.cfg,org.hibernate.vali
dator.constraints.pl",org.hibernate.validator.constraints;version="6.
0.0.CR3";uses:="javax.validation,javax.validation.constraints",org.hi
bernate.validator.constraints.br;version="6.0.0.CR3";uses:="javax.val
idation,javax.validation.constraints,org.hibernate.validator.constrai
nts",org.hibernate.validator.constraints.pl;version="6.0.0.CR3";uses:
="javax.validation",org.hibernate.validator.constraints.time;version=
"6.0.0.CR3";uses:="javax.validation",org.hibernate.validator.constrai
ntvalidation;version="6.0.0.CR3";uses:="javax.validation",org.hiberna
te.validator.constraintvalidators;version="6.0.0.CR3";uses:="javax.va
lidation,org.hibernate.validator.constraints",org.hibernate.validator
.engine;version="6.0.0.CR3";uses:="javax.validation",org.hibernate.va
lidator.group;version="6.0.0.CR3";uses:="org.hibernate.validator.spi.
group",org.hibernate.validator.messageinterpolation;version="6.0.0.CR
3";uses:="javax.el,javax.validation,org.hibernate.validator.spi.resou
rceloading",org.hibernate.validator.parameternameprovider;version="6.
0.0.CR3";uses:="com.thoughtworks.paranamer,javax.validation",org.hibe
rnate.validator.path;version="6.0.0.CR3";uses:="javax.validation",org
.hibernate.validator.resourceloading;version="6.0.0.CR3";uses:="org.h
ibernate.validator.spi.resourceloading",org.hibernate.validator.spi.c
fg;version="6.0.0.CR3";uses:="org.hibernate.validator.cfg",org.hibern
ate.validator.spi.group;version="6.0.0.CR3",org.hibernate.validator.s
pi.resourceloading;version="6.0.0.CR3",org.hibernate.validator.intern
al.engine;version="6.0.0.CR3",org.hibernate.validator.internal.util;v
ersion="6.0.0.CR3",org.hibernate.validator.internal.util.classhierarc
hy;version="6.0.0.CR3",org.hibernate.validator.internal.util.logging;
version="6.0.0.CR3",org.hibernate.validator.internal.util.privilegeda
ctions;version="6.0.0.CR3",org.hibernate.validator.internal.engine.va
lueextraction;version="6.0.0.CR3"
Bundle-Name: Hibernate Validator Engine
Bundle-Version: 6.0.0.CR3
Created-By: Apache Maven Bundle Plugin
Build-Jdk: 1.8.0_121
Implementation-URL: http://hibernate.org/validator/
Specification-Version: 2.0
|