Skip to content

cm.json: Improve Configurator specification conformance - #548

Open
wilx wants to merge 13 commits into
apache:masterfrom
wilx:cm-conformance
Open

cm.json: Improve Configurator specification conformance#548
wilx wants to merge 13 commits into
apache:masterfrom
wilx:cm-conformance

Conversation

@wilx

@wilx wilx commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

This updates cm.json to Felix parent 9 and tightens its handling of OSGi Configurator JSON resources.

The changes:

  • convert mixed JSON arrays to String[] as required by Configurator §150.3.4;
  • strictly validate :configurator:resource-version, :configurator:symbolic-name, and :configurator:version according to §150.3.1, including metadata supplied in bundle resources;
  • preserve PID-level Configurator property keys so suffixed aliases are not interpreted as the standard policy or ranking keys, as defined in §150.3.3; and
  • add regression coverage before each behavioral fix.

The downstream Configurator module is also updated to Felix parent 9 and from org.apache.felix.cm.json 2.0.0 to this branch's 2.0.9-SNAPSHOT. This makes its Java 17 build use the current cm.json implementation.

The metadata work intentionally does not change how PID-level :configurator: properties are retained when no property handler is installed; that can be addressed separately with an API design suitable for round-tripping.

Validation on Java 17:

env JAVA_HOME=/opt/jdks/latest-17 nice -n 10 /opt/maven/latest/bin/mvn -B -V -Dstyle.color=always -f cm.json/pom.xml clean install
env JAVA_HOME=/opt/jdks/latest-17 nice -n 10 /opt/maven/latest/bin/mvn -B -V -Dstyle.color=always -f configurator/pom.xml clean verify

Results:

  • cm.json: 60 tests, 0 failures/errors; bundle baseline, RAT, and legal-file checks pass.
  • Configurator: 18 tests, 0 failures/errors; bundle creation, RAT, and legal-file checks pass.

wilx added 13 commits August 24, 2026 20:51
Follow OSGi Compendium 8.1.0, Configurator Specification §150.3.4.
Follow OSGi Compendium 8.1.0, Configurator Specification §150.3.1.
Follow OSGi Compendium 8.1.0, Configurator Specification §150.3.1.
Follow OSGi Compendium 8.1.0, Configurator Specification §150.3.1.
Follow OSGi Compendium 8.1.0, Configurator Specification §150.3.3.
@stbischof

Copy link
Copy Markdown
Contributor

would you be so nice and test to the osgi tck?
in max 1 week you kan find it here
https://github.com/osgi/org.osgi.service.configurator

@wilx

wilx commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

I have created https://github.com/wilx/felix-configurator-tck project to test against the test in OSGi TCK that exercise it. The branch passes. If this is what you meant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants