Improve XML schema validation (#18608)
* Move validation to subprojects, skip on top level to avoid double execution using a marker file (regression, #18579) Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>pull/18616/head
parent
04c4085c1b
commit
8ecbbbf29d
|
@ -695,10 +695,53 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>xml-maven-plugin</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<configuration>
|
||||
<validationSets>
|
||||
<validationSet>
|
||||
<dir>.</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>${basedirRoot}/src/thing-type-xml-validation-catalog.xml</catalog>
|
||||
</catalogs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>validate</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>skipXmlValidation</id>
|
||||
<activation>
|
||||
<file>
|
||||
<exists>skipXmlValidation.marker</exists>
|
||||
</file>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>xml-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<!-- suppress embedding of dependencies -->
|
||||
<profile>
|
||||
<id>no-embed-dependencies</id>
|
||||
|
|
24
pom.xml
24
pom.xml
|
@ -641,30 +641,6 @@ 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>${basedirRoot}/src/thing-type-xml-validation-catalog.xml</catalog>
|
||||
</catalogs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>validate</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<extensions>
|
||||
<extension>
|
||||
|
|
Loading…
Reference in New Issue