<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>com.cognifide.maven.plugins</groupId>
    <artifactId>vltco-maven-plugin</artifactId>
    <version>0.2.1</version>
    <packaging>maven-plugin</packaging>

    <name>Maven Vault Checkout Plugin</name>
    <description>
        Plugin designed for Maven 2.x+ based builds to automate content checkout from AEM.
    </description>
    <url>https://github.com/Cognifide/Maven-Vault-Checkout-Plugin</url>

    <organization>
        <name>Cognifide</name>
        <url>http://www.cognifide.com</url>
    </organization>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>lmatyja</id>
            <name>Łukasz Matyja</name>
            <email>lukasz.matyja@cognifide.com</email>
            <organization>Cognifide</organization>
            <organizationUrl>http://www.cognifide.com</organizationUrl>
        </developer>
        <developer>
            <id>spiochacz</id>
            <name>Sławomir Piochacz</name>
            <email>slawomir.piochacz@cognifide.com</email>
            <organization>Cognifide</organization>
            <organizationUrl>http://www.cognifide.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:Cognifide/Maven-Vault-Checkout-Plugin.git</connection>
        <developerConnection>scm:git:git@github.com:Cognifide/Maven-Vault-Checkout-Plugin.git</developerConnection>
        <tag>vltco-maven-plugin-0.2.1</tag>
        <url>https://github.com/Cognifide/Maven-Vault-Checkout-Plugin</url>
    </scm>

    <!-- please add sonatype credentials in your user settings.xml file -->
    <distributionManagement>
        <repository>
            <id>oss.sonatype.org</id>
            <name>Sonatype Staging Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>oss.sonatype.org</id>
            <name>Nexus Snapshots Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <!-- should be overwritten from commandline during release -->
        <gpg.keyname>9A105524</gpg.keyname>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jackrabbit.vault</groupId>
            <artifactId>vault-cli</artifactId>
            <version>3.1.24</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>3.2.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <compilerVersion>1.6</compilerVersion>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.4</version>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>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.4</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>
                                    <!--
                                      this should be overwritten during signing AET artifacts
                                      with -Dgpg.keyname
                                      but when used with maven-release-plugin
                                      -Darguments="-Dgpg.keyname" should be used
                                      see http://maven.apache.org/plugins/maven-gpg-plugin/sign-mojo.html#keyname
                                      and http://maven.apache.org/maven-release/maven-release-plugin/prepare-mojo.html#arguments
                                    -->
                                    <keyname>${gpg.keyname}</keyname>
                                    <executable>gpg2</executable>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
