<?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>

    <parent>
        <groupId>io.gitlab.openchvote</groupId>
        <artifactId>openchvote</artifactId>
        <version>1.2</version>
    </parent>

    <artifactId>runner</artifactId>
    <name>runner</name>

    <repositories>
        <repository>
            <id>local-maven-repo</id>
            <url>file:///${project.basedir}/../project-maven-repo</url>
        </repository>
    </repositories>

    <description>
        This module provides an election runner class, which can be used for simulating CHVote election events based
        on various parameters.
    </description>

    <dependencies>
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>utilities</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>algorithms</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>framework</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>protocol</artifactId>
            <version>1.2</version>
        </dependency>
        <!-- Note: The following dependency is implicitly used via reflection; do not remove. -->
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>services</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>coordinator</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>administrator</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>election-authority</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>printing-authority</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>voting-client</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>voter</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>io.gitlab.openchvote</groupId>
            <artifactId>the-public</artifactId>
            <version>1.2</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>${spock.core.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy</artifactId>
            <version>${groovy.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <properties>
        <mainClass>ch.openchvote.runner.Main</mainClass>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${mycila.license.plugin.version}</version>
                <configuration>
                    <header>../etc/license-header.txt</header>
                    <headerDefinitions>
                        <headerDefinition>../etc/filecomment.xml</headerDefinition>
                    </headerDefinitions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <configuration>
                    <usedDependencies>
                        <!-- Avoids 'Unused declared dependencies found: ch.openchvote:services:jar:<version>:compile'-->
                        <dependency>ch.openchvote:services</dependency>
                    </usedDependencies>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>java</executable>
                    <arguments>
                        <argument>--module-path</argument>
                        <modulepath/>
                        <argument>--enable-preview</argument>
                        <argument>-m</argument>
                        <argument>ch.openchvote.runner/ch.openchvote.runner.Main</argument>
                    </arguments>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
