Am 04.12.2019 um 14:42 schrieb Bertrand Delacretaz:
We can discuss separately whether "strict" is the right base name.
Naming is hard ;-)
:)
1) When this is implemented, the o.a.s.servlets.resolver bundle gets
an additional (static, in pom.xml) value for its Provide-Capability
header. Suggested value:
org.apache.sling.servlets.resolver;strict.mode.support:Version=1.0.0
That's one option. The other option is to increase the version for the
already existing capability.
Right now the bundle provides:
osgi.extender;osgi.extender="org.apache.sling.servlets.resolver";version:Version="1.0"
As we're adding new functionality, we could update that to
osgi.extender;osgi.extender="org.apache.sling.servlets.resolver";version:Version="1.1"
Existing bundles continue to work (they should require version 1.0),
new/updated bundles making use of the new functionality, should require
version 1.1.
I'm saying "should" here as we can't enfore it in all cases.
2) The bnd functionality is modified to add the corresponding
Require-Capability header (require strict.mode.support >= 1.0.0) when
building bundles that contain at least one servlet with both a
sling.servlet.paths and a sling.servlet.resolution service property.
At this stage I don't know where this needs to be implemented.
I'm not sure if that is possible. If so, that would be nice.
I think, what we can do is provide a new version of the sling servlet
annotations which provide the new mode property. And if these
annotations are used, we require version 1.1 of the capability.
Now, that means - regardless of the value used for the mode (strict or
default) - the newer resolver bundle is required; but that's probably
fine as the only reason to update to the new annotations is to use the
new functionality.
Regards
Carsten
--
Carsten Ziegeler
Adobe Research Switzerland
[email protected]