Skip to content

Use local schema for add-on JAXB generation - #5757

Merged
kaikreuzer merged 1 commit into
openhab:mainfrom
wborn:addon-local-jaxb-schema
Aug 12, 2026
Merged

Use local schema for add-on JAXB generation#5757
kaikreuzer merged 1 commit into
openhab:mainfrom
wborn:addon-local-jaxb-schema

Conversation

@wborn

@wborn wborn commented Aug 5, 2026

Copy link
Copy Markdown
Member

Description

The build log of #5720 shows that JAXB/XJC timed out while downloading:

https://openhab.org/schemas/config-description-1.0.0.xsd

The failed import subsequently caused errors such as:

undefined simple type 'config-description:idRestrictionPattern'

This PR adds an XML catalog to org.openhab.core.addon so that the schema is resolved from the local org.openhab.core.config.core module instead.

This follows the same approach already used by the org.openhab.core.thing bundle.

Benefits

  • Prevents JAXB generation failures when openhab.org is temporarily unavailable.
  • Removes an unnecessary network dependency from the build.
  • Reduces requests to openhab.org during CI and local builds.
  • Keeps the canonical public schema URL in the XSD.
  • Does not change the generated Java sources.

Testing

The change can be tested easily by building the bundle without network access, or by specifically blocking access to openhab.org, and verifying that JAXB source generation still succeeds.

  • Compared src/generated/java before and after the change; no differences were found.
  • Confirmed that JAXB source generation succeeds while access to openhab.org is blocked.

See also: #5731

* Add an XML catalog for the add-on JAXB schema generation.
* Resolve the config-description schema from the local core module.

This prevent build failures when openhab.org is unavailable and reduces requests during builds.
It follows the same approach already used by the org.openhab.core.thing bundle.

Signed-off-by: Wouter Born <github@maindrain.net>
@kaikreuzer
kaikreuzer merged commit be64ed1 into openhab:main Aug 12, 2026
6 checks passed
@kaikreuzer kaikreuzer added this to the 5.3 milestone Aug 12, 2026
@wborn
wborn deleted the addon-local-jaxb-schema branch August 12, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants