<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>cmpltpackage</artifactId>
<parent>
<groupId>ru.intertrust.cmj</groupId>
<artifactId>cm-custom-{project}</artifactId>
<version>NPI-7.1.2.plt.126</version>
</parent>
<dependencies>
<!--Типовая палитра-->
<dependency>
<groupId>ru.intertrust.cmj</groupId>
<artifactId>cmpalette</artifactId>
<version>${cmpalette.version}</version>
</dependency>
</dependencies>
<build>
<!--Включаем в собранный jar только override, чтобы соседние папки, которые могут
создать игнорировались и не создавали коллизий-->
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>override/**</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!-- Фильтр артефактов, которые нужно включить в uber jar, нужен, чтобы при возникновении
новых dependency они не подтянулись в uber jar -->
<artifactSet>
<includes>
<include>ru.intertrust.cmj:cmpalette</include>
</includes>
</artifactSet>
<filters>
<!-- Исключаем импорт из корневого jar META-INF и папки override-->
<filter>
<artifact>ru.intertrust.cmj:cmpalette</artifact>
<excludes>
<exclude>META-INF/**</exclude>
<exclude>override/**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<!-- Проверка XML по XSD-схемам -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>validate-xml</id>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<resourcecount property="xml.count">
<fileset dir="src/main/resources">
<include name="**/*.xml"/>
<exclude name="**/collection/"/>
<exclude name="**/search/"/>
</fileset>
</resourcecount>
<fail message="fileset does not match any xml file (use same fileset for actual validation)">
<condition>
<equals arg1="${xml.count}" arg2="0"/>
</condition>
</fail>
<echo message="validating ${xml.count} xml files"/>
<schemavalidate failonerror="false">
<schema namespace="http://www.intertrust.ru/schema/palette/cat-ui" file="src/main/resources/xsd/cat-ui-1.0.xsd"/>
<schema namespace="http://www.intertrust.ru/schema/palette/tn-ui" file="src/main/resources/xsd/tn-ui-1.0.xsd"/>
<schema namespace="http://www.intertrust.ru/schema/palette/tn-schema" file="src/main/resources/xsd/tn-schema-1.0.xsd"/>
<schema namespace="http://www.intertrust.ru/schema/palette/pkd" file="src/main/resources/xsd/pkd-1.0.xsd"/>
<schema namespace="http://www.intertrust.ru/schema/palette/links" file="src/main/resources/xsd/links-1.0.xsd"/>
<schema namespace="http://www.intertrust.ru/schema/palette/notifications" file="src/main/resources/xsd/notifications-1.0.xsd"/>
<fileset dir="src/main/resources">
<include name="**/*.xml"/>
<exclude name="**/collection/"/>
<exclude name="**/search/"/>
</fileset>
</schemavalidate>
<schemavalidate failonerror="true">
<schema namespace="http://www.intertrust.ru/schema/palette/cat-ui" file="src/main/resources/xsd/cat-ui-1.0.xsd"/>
<schema namespace="http://www.intertrust.ru/schema/palette/tn-ui" file="src/main/resources/xsd/tn-ui-1.0.xsd"/>
<schema namespace="http://www.intertrust.ru/schema/palette/tn-schema" file="src/main/resources/xsd/tn-schema-1.0.xsd"/>
<schema namespace="http://www.intertrust.ru/schema/palette/pkd" file="src/main/resources/xsd/pkd-1.0.xsd"/>
<schema namespace="http://www.intertrust.ru/schema/palette/links" file="src/main/resources/xsd/links-1.0.xsd"/>
<schema namespace="http://www.intertrust.ru/schema/palette/notifications" file="src/main/resources/xsd/notifications-1.0.xsd"/>
<fileset dir="src/main/resources">
<include name="**/*.xml"/>
<exclude name="**/collection/"/>
<exclude name="**/search/"/>
</fileset>
</schemavalidate>
<echo message="all ${xml.count} xml documents are valid"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> |