<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>
    <groupId>org.polystat</groupId>
    <artifactId>py2eo</artifactId>
    <version>0.0.13</version>
    <parent>
        <groupId>com.jcabi</groupId>
        <artifactId>parent</artifactId>
        <version>0.56.0</version>
    </parent>
    <properties>
        <maven.compiler.source>14</maven.compiler.source>
        <maven.compiler.target>14</maven.compiler.target>
        <java.version>14</java.version>
        <encoding>UTF-8</encoding>
        <scala.version>2.13.6</scala.version>
        <antlr.version>4.9.2</antlr.version>
    </properties>
    <packaging>pom</packaging>
    <name>py2eo</name>
    <modules>
        <module>parser</module>
        <module>transpiler</module>
        <module>checker</module>
    </modules>
    <dependencies>
        <dependency>
            <groupId>org.cactoos</groupId>
            <artifactId>cactoos</artifactId>
            <version>0.50</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <skip>${skipTests}</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <mainClass>org.polystat.py2eo.transpiler.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <configuration>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <workingDirectory>${project.basedir}</workingDirectory>
                            <executable>java</executable>
                            <arguments>
                                <argument>-jar</argument>
                                <argument>${project.build.directory}/scalastyle_2.13-1.5.1-assembly.jar</argument>
                                <argument>-c</argument>
                                <argument>${project.basedir}/scalastyle_config.xml</argument>
                                <argument>${project.basedir}/transpiler/src/main</argument>
                                <argument>${project.basedir}/parser</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>wagon-maven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>download-single</goal>
                        </goals>
                        <configuration>
                            <url>https://repo1.maven.org/maven2/com/beautiful-scala/scalastyle_2.13/1.5.1/</url>
                            <fromFile>scalastyle_2.13-1.5.1-assembly.jar</fromFile>
                            <toFile>${project.build.directory}/scalastyle_2.13-1.5.1-assembly.jar</toFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
