<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2021 Bixbit - Krzysztof Benedyczak. All rights reserved.
  ~ See LICENCE.txt file for licensing information.
  -->

<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>unity-server-parent</artifactId>
        <groupId>io.imunity</groupId>
        <version>4.2.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>unity-server-vaadin-authentication</artifactId>
    <name>UNITY Server vaadin authentication module</name>
    <description>Vaadin login view and components</description>

    <properties>
        <m.name>vaadin-authentication</m.name>
        <vaadin.productionMode>true</vaadin.productionMode>
    </properties>

    <scm>
        <connection>${scm.base}/${m.name}</connection>
        <developerConnection>${scm.base}/${m.name}</developerConnection>
        <tag>unity-server-parent-4.2.0</tag>
    </scm>

    <dependencies>
        <dependency>
            <groupId>io.imunity</groupId>
            <artifactId>unity-server-engine-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>io.imunity</groupId>
            <artifactId>unity-vaadin-elements</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.vaadin</groupId>
                    <artifactId>vaadin-dev-server</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.imunity</groupId>
            <artifactId>unity-server-vaadin-endpoint-common</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- test -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>i18n-messages</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/assembly-i18n.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>clean-frontend</goal>
                            <goal>prepare-frontend</goal>
                            <goal>build-frontend</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <optimizeBundle>false</optimizeBundle>
                </configuration>
            </plugin>
            <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<excludes>
						<exclude>META-INF/VAADIN/config/flow-build-info.json</exclude>
					</excludes>
				</configuration>	
			</plugin>
        </plugins>
    </build>

</project>