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

    <!-- inspired by http://stackoverflow.com/questions/14885048/share-specific-pmd-rulesets-across-multi-module-maven-project -->
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <groupId>de.weltraumschaf</groupId>
    <artifactId>java-build-tools</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <name>Weltraumschafs Java Build Tools</name>
    <description>Build tools like Checkstyle and PMD configurations.</description>
    <url>http://weltraumschaf.github.com/java-build-tools</url>

    <organization>
        <name>Weltraumschaf</name>
        <url>http://www.weltraumschaf.de</url>
    </organization>

    <developers>
        <developer>
            <id>Weltraumschaf</id>
            <name>Sven Strittmatter</name>
            <email>weltraumschaf@googlemail.com</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>THE BEER-WARE LICENSE</name>
            <url>http://www.weltraumschaf.de/the-beer-ware-license.txt</url>
            <distribution>repo</distribution>
            <comments>
                LICENSE

                "THE BEER-WARE LICENSE" (Revision 42):
                "Sven Strittmatter" &lt;weltraumschaf(at)googlemail(dot)com&gt; wrote this file.
                As long as you retain this notice you can do whatever you want with
                this stuff. If we meet some day, and you think this stuff is worth it,
                you can buy me a beer in return.
            </comments>
        </license>
    </licenses>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/Weltraumschaf/java-build-tools/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git://github.com/Weltraumschaf/java-build-tools.git</connection>
        <developerConnection>scm:git:git@github.com:Weltraumschaf/java-build-tools.git</developerConnection>
        <url>https://github.com/Weltraumschaf/java-build-tools.git</url>
      <tag>1.0.0</tag>
  </scm>

    <distributionManagement>
        <site>
            <id>github-project-site</id>
            <url>gitsite:git@github.com/Weltraumschaf/java-build-tools.git</url>
        </site>
    </distributionManagement>

    <properties>
        <maven.version>3.0.3</maven.version>
    </properties>

    <prerequisites>
        <maven>${maven.version}</maven>
    </prerequisites>

    <build>
        <defaultGoal>install</defaultGoal>

        <extensions>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-provider-gitexe</artifactId>
                <version>1.8.1</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-manager-plexus</artifactId>
                <version>1.8.1</version>
            </extension>
            <extension>
                <groupId>org.kathrynhuxtable.maven.wagon</groupId>
                <artifactId>wagon-gitsite</artifactId>
                <version>0.3.1</version>
            </extension>
        </extensions>

        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
                <plugin>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.5</version>
                </plugin>
                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <bottom>
                        Copyright &amp;copy; 2012 &lt;a href="http://www.weltraumschaf.de/" target="_blank"&gt;
                        Sven Strittmatter&lt;/a&gt;. All Rights Reserved.
                    </bottom>
                    <doctitle>${project.name} - ${project.version}</doctitle>
                    <windowtitle>${project.name} - ${project.version}</windowtitle>
                    <show>private</show>
                    <charset>${project.build.sourceEncoding}</charset>
                    <docencoding>${project.build.sourceEncoding}</docencoding>
                    <source>${project.build.version.source}</source>
                    <links>
                        <link>http://docs.oracle.com/javase/6/docs/api/</link>
                        <!-- test dependencies -->
                        <link>http://junit.sourceforge.net/javadoc/</link>
                        <link>http://docs.mockito.googlecode.com/hg/latest/</link>
                    </links>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>javadoc</goal>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- http://jpz-log.info/archives/2010/12/14/1446/ -->
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <configuration>
                            <keyname>45585598</keyname>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>install</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
