<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Bobcat
  %%
  Copyright (C) 2016 Cognifide Ltd.
  %%
  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.
#L%
-->
<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>com.cognifide.qa.bb</groupId>
    <artifactId>bobcat-parent</artifactId>
    <version>1.1.2</version>
    <packaging>pom</packaging>

    <name>Bobcat Parent</name>
    <description>Bobcat is an automated testing framework for functional testing of web applications.</description>
    <url>https://github.com/cognifide/bobcat</url>
    <inceptionYear>2016</inceptionYear>

    <organization>
        <name>Cognifide Ltd.</name>
        <url>http://www.cognifide.com</url>
    </organization>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Karol Kujawiak</name>
            <email>karol.kujawiak@cognifide.com</email>
        </developer>
    </developers>

    <modules>
        <module>bobcat</module>
        <module>bb-aem-integration-tests</module>
    </modules>

    <scm>
        <connection>scm:git:git@github.com:Cognifide/bobcat.git</connection>
        <developerConnection>scm:git:git@github.com:Cognifide/bobcat.git</developerConnection>
        <tag>1.1.2</tag>
        <url>https://github.com/Cognifide/bobcat</url>
    </scm>

    <distributionManagement>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jacoco.version>0.7.7.201606060606</jacoco.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <version>0.12</version>
                    <executions>
                        <execution>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <includes>
                            <include>src/main/java/**</include>
                            <include>src/test/java/**</include>
                            <include>src/main/resources/**</include>
                            <include>pom.xml</include>
                        </includes>
                        <excludes>
                            <exclude>**/*.json</exclude>
                            <exclude>**/*.yml</exclude>
                            <exclude>**/*.yaml</exclude>
                            <exclude>**/*.properties</exclude>
                            <exclude>**/*.Processor</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.3</version>
                    <configuration>
                        <fork>true</fork>
                        <source>1.8</source>
                        <target>1.8</target>
                        <compilerVersion>1.8</compilerVersion>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>properties-maven-plugin</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <files>
                            <file>${external.properties}</file>
                        </files>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.ekryd.sortpom</groupId>
                    <artifactId>sortpom-maven-plugin</artifactId>
                    <version>2.5.0</version>
                    <executions>
                        <execution>
                            <phase>verify</phase>
                            <goals>
                                <goal>sort</goal>
                            </goals>
                            <configuration>
                                <nrOfIndentSpace>4</nrOfIndentSpace>
                                <keepBlankLines>true</keepBlankLines>
                                <createBackupFile>false</createBackupFile>
                                <expandEmptyElements>false</expandEmptyElements>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>1.9</version>
                    <executions>
                        <execution>
                            <phase>process-sources</phase>
                            <goals>
                                <goal>update-file-header</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <verbose>false</verbose>
                        <licenseName>apache_v2</licenseName>
                        <roots>
                            <root>..</root>
                        </roots>
                        <excludes>
                            <exclude>**/*.json</exclude>
                            <exclude>**/*.properties</exclude>
                            <exclude>**/target/**</exclude>
                        </excludes>
                        <extraExtensions>
                            <feature>properties</feature>
                        </extraExtensions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</version>
                    <executions>
                        <execution>
                            <id>default-prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.2</version>
                <configuration>
                    <username>${scm.username}</username>
                    <password>${scm.password}</password>
                    <preparationGoals>clean install</preparationGoals>
                    <useReleaseProfile>false</useReleaseProfile>
                    <arguments>-Psonatype-oss-release -DskipTests</arguments>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.ekryd.sortpom</groupId>
                <artifactId>sortpom-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>sonatype-oss-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.3</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
