<!--

    Copyright © 2021 Ovea (d.avenante@gmail.com)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>sc.tyro</groupId>
    <artifactId>percy-screenshot-provider</artifactId>
    <version>1.0.0</version>

    <name>Tyro::Percy Screenshot provider</name>
    <inceptionYear>2021</inceptionYear>

    <description>Percy screenshot provider</description>
    <url>http://www.tyro.sc</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>${maven.compiler.source}</maven.compiler.target>

        <tyro-web.version>1.2.0</tyro-web.version>
        <groovy.version>2.5.14</groovy.version>
        <percy.version>1.0.0</percy.version>
        <codenarc.version>2.1.0</codenarc.version>
        <slf4j.version>1.7.32</slf4j.version>

        <!-- Tests -->
        <junit.jupiter.version>5.8.0</junit.jupiter.version>
        <mockito-junit.version>3.12.4</mockito-junit.version>

        <!-- Plugins -->
        <gmavenplus-plugin.version>1.8.1</gmavenplus-plugin.version>
        <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
        <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <groovydoc-maven-plugin.version>2.1</groovydoc-maven-plugin.version>
        <license-maven-plugin.version>4.1</license-maven-plugin.version>
        <codenarc-maven-plugin>0.22-1</codenarc-maven-plugin>
        <codenarc.version>2.1.0</codenarc.version>
    </properties>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:Tyro-sc/percy-screenshot-provider.git</connection>
        <developerConnection>scm:git:git@github.com:Tyro-sc/percy-screenshot-provider.git</developerConnection>
        <url>https://github.com/Tyro-sc/percy-screenshot-provider</url>
        <tag>1.0.0</tag>
    </scm>

    <developers>
        <developer>
            <id>altus34</id>
            <name>David Avenante</name>
            <email>altus34@gamil.com</email>
            <organization>Ovea</organization>
            <organizationUrl>http://www.ovea.com/</organizationUrl>
            <timezone>-5</timezone>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>${gmavenplus-plugin.version}</version>
                <configuration>
                    <verbose>true</verbose>
                    <invokeDynamic>false</invokeDynamic>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>addSources</goal>
                            <goal>addTestSources</goal>
                            <goal>compile</goal>
                            <goal>compileTests</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>${groovy.version}</version>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license-maven-plugin.version}</version>
                <configuration>
                    <licenseSets>
                        <licenseSet>
                            <header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
                            <excludes>
                                <exclude>**/README</exclude>
                                <exclude>**/LICENCE</exclude>
                                <exclude>**/*.yml</exclude>
                                <exclude>mvn*</exclude>
                                <exclude>.mvn/**</exclude>
                                <exclude>**/*.adoc</exclude>
                                <exclude>**/*.spec</exclude>
                                <exclude>src/test/resources/**</exclude>
                                <exclude>src/main/resources/**</exclude>
                            </excludes>
                        </licenseSet>
                    </licenseSets>
                    <properties>
                        <owner>Ovea</owner>
                        <email>d.avenante@gmail.com</email>
                    </properties>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>codenarc-maven-plugin</artifactId>
                <version>${codenarc-maven-plugin}</version>
                <configuration>
                    <codeNarcVersion>${codenarc.version}</codeNarcVersion>
                </configuration>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>codenarc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>io.percy</groupId>
            <artifactId>percy-java-selenium</artifactId>
            <version>${percy.version}</version>
        </dependency>
        <dependency>
            <groupId>sc.tyro</groupId>
            <artifactId>tyro-web</artifactId>
            <version>${tyro-web.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>net.bytebuddy</groupId>
                    <artifactId>byte-buddy</artifactId>
                </exclusion>
            </exclusions>
            <scope>provided</scope>
        </dependency>

        <!-- Tests -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${mockito-junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <repository>
            <id>ovea-oss-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>ovea-oss-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <configuration>
                            <executable>${gpg.executable}</executable>
                            <keyname>${gpg.keyname}</keyname>
                            <passphrase>${gpg.passphrase}</passphrase>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.bluetrainsoftware.maven</groupId>
                        <artifactId>groovydoc-maven-plugin</artifactId>
                        <version>${groovydoc-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-docs</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>attach-docs</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
