Repository navigation
ARIES-2251: Use org.osgi.service.blueprint instead of blueprint-api bundle - #951
Conversation
bdc5758 to
64af406
Compare
jbonofre
left a comment
There was a problem hiding this comment.
Thanks for this. Moving to org.osgi:org.osgi.service.blueprint looks right, and the public API of the two jars matches. Two things need fixing before merge, with details inline:
- the tutorial's
config.inipoints at a jar name the assembly doesn't create; - the new
blueprint.xsdis the OSGi 1.0.1 schema with lax wildcards, not the existing schema moved over, so validation becomes more permissive.
Also worth checking before release: mvn -Pdeploy on blueprint-bundle (javadoc now runs over the OSGi sources' package-info.java, which import org.osgi.annotation.versioning), and a shade filter so the noosgi jar doesn't pick up the OSGi jar's OSGI-OPT/src, LICENSE and about.html.
| org.apache.aries.quiesce.api-${org.apache.aries.quiesce.api.version}.jar@start,\ | ||
| org.apache.aries.quiesce.manager-${org.apache.aries.quiesce.manager.version}.jar@start,\ | ||
| org.apache.aries.blueprint.api-${org.apache.aries.blueprint.api.version}.jar@start,\ | ||
| org.osgi-${org.osgi.service.blueprint.version}.jar@start,\ |
There was a problem hiding this comment.
The assembly uses the default file name mapping (artifactId-version.jar), so this bundle ends up in /platform as org.osgi.service.blueprint-1.0.2.jar. As written, Equinox won't find org.osgi-1.0.2.jar, and blueprint-core can't resolve its org.osgi.service.blueprint.* imports.
| org.osgi-${org.osgi.service.blueprint.version}.jar@start,\ | |
| org.osgi.service.blueprint-${org.osgi.service.blueprint.version}.jar@start,\ |
There was a problem hiding this comment.
Fixed - there was also missing objenesis jar
| <xsd:element name="reference-list" type="Treference-list" /> | ||
| <xsd:element name="bean" type="Tbean" /> | ||
| <xsd:element name="reference" type="Treference" /> | ||
| <xsd:any namespace="##other" processContents="lax" /> |
There was a problem hiding this comment.
This isn't the schema blueprint-api shipped. It's the OSGi 1.0.1 schema. Apart from whitespace and the header, the only difference is that all 17 <xsd:any namespace="##other" processContents="strict"/> wildcards are now lax (plus version="1.0.1").
That changes runtime validation in blueprint-core, blueprint-bundle and blueprint-noosgi. An element in a custom namespace with no declaration in a loaded schema used to be rejected at parse time (cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found...). Now it passes validation, and catching it is left to the namespace handler. A typo like <ext:property-placeholderr> is the simplest example.
Could we git mv the existing blueprint/blueprint-api/src/main/resources/org/osgi/service/blueprint/blueprint.xsd here instead? That keeps validation unchanged and should make the new versioning excludes unnecessary. If switching to the lax schema is wanted, I'd rather do it in its own JIRA, with a package version bump.
The same applies to org/apache/aries/blueprint/blueprint.xsd, which is byte-identical to this file.
There was a problem hiding this comment.
I used the blueprint.xsd from blueprint-api artifact instead of the xsd from OSGi
| <exclude>In the package org.osgi.service.blueprint, The schema file has been updated: blueprint.xsd.</exclude> | ||
| <exclude>In the package org.apache.aries.blueprint, The schema file has been updated: blueprint.xsd.</exclude> |
There was a problem hiding this comment.
These two excludes are only needed because the xsd content changed (see the comment on blueprint.xsd). If the existing schema is moved over unchanged, they can go.
If they stay, they hide more than this one change. In BundleCompatibility, once the xsd update is recorded as a major change for a package, the remaining xsds aren't compared and checkAdditionalClassOrXsds is skipped. The exclude then turns the result into NO_CHANGE. So until the baseline moves past 1.10.3, new or changed classes and xsds in org.osgi.service.blueprint or org.apache.aries.blueprint won't be reported. Also, org.osgi.service.blueprint;version=1.0.0 keeps its version even though its schema changed.
There was a problem hiding this comment.
Indeed it's not necessary now
| <exclude>In the package org.osgi.service.blueprint, The schema file has been updated: blueprint.xsd.</exclude> | ||
| <exclude>In the package org.apache.aries.blueprint, The schema file has been updated: blueprint.xsd.</exclude> |
There was a problem hiding this comment.
Same as in blueprint-core/pom.xml: these go away if the xsd is moved over unchanged.
There was a problem hiding this comment.
Indeed it's not necessary now
64af406 to
00586a0
Compare
|
Thank you @jbonofre for the review
|
|
I was looking for the good solution for the |
blueprint.xsd is added in blueprint-core and blueprint-maven-plugin copied from https://docs.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsdApache Semantic Versioning for blueprint-core and blueprint-bundle are configured to ignore blueprint.xsd change (all content change in xsd files suggest bumping major version)