<?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">
    <parent>
        <artifactId>key-translation</artifactId>
        <groupId>com.scytl.products.ov.channel.kt</groupId>
        <version>2.1.7</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>
    <artifactId>key-translation-assembly</artifactId>

    <name>Online Voting - Key Translation - Assembly</name>
    <description>OV Key Translation Assembly</description>
   	<dependencies>
        <dependency>
		    <groupId>com.scytl.products.ov.channel.kt.ui</groupId>
		    <artifactId>kt-ws-rest</artifactId>
		    <type>war</type>
		    <version>${project.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.scytl.math</groupId>
                                    <artifactId>scytl-math</artifactId>
                                    <version>${scytl-math.version}</version>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unpack</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.scytl.math</groupId>
                                    <artifactId>scytl-math-native</artifactId>
                                    <version>${scytl-math.version}</version>
                                    <classifier>amd64-Linux-gpp-jni</classifier>
                                    <type>nar</type>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.scytl.math</groupId>
                                    <artifactId>scytl-math-native</artifactId>
                                    <version>${scytl-math.version}</version>
                                    <classifier>amd64-Windows-gpp-jni</classifier>
                                    <type>nar</type>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.scytl.gmp</groupId>
                                    <artifactId>scytl-gmp</artifactId>
                                    <version>${scytl-gmp.version}</version>
                                    <classifier>amd64-Linux-gpp-shared</classifier>
                                    <type>nar</type>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.scytl.gmp</groupId>
                                    <artifactId>scytl-gmp</artifactId>
                                    <version>${scytl-gmp.version}</version>
                                    <classifier>amd64-Windows-gpp-shared</classifier>
                                    <type>nar</type>
                                </artifactItem>
                            </artifactItems>
                         <outputDirectory>${project.build.directory}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>package.xml</descriptor>
                    </descriptors>
                    <appendAssemblyId>false</appendAssemblyId>
                    <finalName>key-translation-assembly-${project.version}</finalName>
                </configuration>
                <executions>
                    <execution>
                        <id>create-archive</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>