Maven Build: Validate Thing-type XML against schema (#18579)

* Maven Build: Validate Thing-type XML against schema

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
pull/18565/head^2
Andrew Fiddian-Green 2025-04-19 09:45:24 +01:00 committed by GitHub
parent 6493e24c53
commit 8c5675d1b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 0 deletions

24
pom.xml
View File

@ -641,6 +641,30 @@ Import-Package: \\
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<validationSets>
<validationSet>
<dir>${session.executionRootDirectory}</dir>
<includes>**/src/main/resources/OH-INF/thing/*.xml</includes>
<systemId>https://openhab.org/schemas/thing-description-1.0.0.xsd</systemId>
</validationSet>
</validationSets>
<catalogs>
<catalog>${session.executionRootDirectory}/src/thing-type-xml-validation-catalog.xml</catalog>
</catalogs>
</configuration>
<executions>
<execution>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<extension>

View File

@ -0,0 +1,4 @@
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<public publicId="https://openhab.org/schemas/thing-description/v1.0.0" uri="thing-description-schema.xsd"/>
<system systemId="https://openhab.org/schemas/thing-description-1.0.0.xsd" uri="thing-description-schema.xsd"/>
</catalog>