<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.labs64.mojo</groupId>
    <artifactId>swid-maven-plugin</artifactId>
    <version>0.1.0</version>
    <packaging>maven-plugin</packaging>
    <name>Labs64 :: Maven Plugin :: SWID Tags Generator</name>
    <url>http://io.labs64.com/swid-maven-plugin/</url>
    <description>Maven Plugin :: SoftWare IDentification (SWID) Tags Generator</description>
    <inceptionYear>2015</inceptionYear>

    <organization>
        <name>Labs64 GmbH</name>
        <url>http://www.labs64.com</url>
    </organization>

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

    <mailingLists>
        <mailingList>
            <name>Maven Plugin :: SWID Tags Generator</name>
            <subscribe>https://groups.google.com/group/swid-maven-plugin</subscribe>
            <unsubscribe>https://groups.google.com/group/swid-maven-plugin</unsubscribe>
            <post>swid-maven-plugin@googlegroups.com</post>
            <archive>https://groups.google.com/group/swid-maven-plugin</archive>
        </mailingList>
    </mailingLists>

    <scm>
        <url>https://github.com/Labs64/swid-maven-plugin</url>
        <connection>scm:git:git@github.com:Labs64/swid-maven-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:Labs64/swid-maven-plugin.git</developerConnection>
        <tag>0.1.0</tag>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/Labs64/swid-maven-plugin/issues</url>
    </issueManagement>

    <ciManagement>
        <system>Travis CI</system>
        <url>https://travis-ci.org/Labs64/swid-maven-plugin</url>
    </ciManagement>

    <developers>
        <developer>
            <id>alexey.averikhin</id>
            <name>Alexey Averikhin</name>
            <email>alexey.averikhin@labs64.de</email>
            <roles>
                <role>Project Manager</role>
                <role>Architect</role>
            </roles>
            <url>https://www.linkedin.com/in/averikhin</url>
            <organization>Labs64 GmbH</organization>
            <organizationUrl>http://www.labs64.de</organizationUrl>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <properties>
        <project.title>${project.name}</project.title>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <java.version>1.6</java.version>
        <maven.version>3.0.4</maven.version>

        <repo.releases.url>OVERRIDE_REPO_URL</repo.releases.url>
        <repo.snapshots.url>OVERRIDE_REPO_URL</repo.snapshots.url>

        <!-- dependency.version>0.0.0</dependency.version -->
        <maven-plugin-api.version>3.2.5</maven-plugin-api.version>
        <maven-core.version>3.2.5</maven-core.version>
        <maven-plugin-annotations.version>3.4</maven-plugin-annotations.version>
        <plexus-utils.version>3.0.21</plexus-utils.version>
        <plexus-resources.version>1.0-alpha-7</plexus-resources.version>
        <org.eclipse.egit.github.core.version>2.1.5</org.eclipse.egit.github.core.version>
        <swid-generator.version>0.3.0</swid-generator.version>
        <commons-lang3.version>3.3.2</commons-lang3.version>
        <commons-collections4.version>4.0</commons-collections4.version>
        <commons-codec.version>1.10</commons-codec.version>
        <commons-io.version>2.4</commons-io.version>
        <log4j.version>1.2.17</log4j.version>
        <slf4j.version>1.7.9</slf4j.version>
        <junit.version>4.12</junit.version>

        <!-- plugin.version>0.0.0</plugin.version -->
        <maven-plugin-plugin.version>3.3</maven-plugin-plugin.version>
        <plexus-component-javadoc.version>1.6</plexus-component-javadoc.version>
        <maven-invoker-plugin.version>1.9</maven-invoker-plugin.version>
        <maven-enforcer-plugin.version>1.3.1</maven-enforcer-plugin.version>
        <maven-compiler-plugin.version>3.2</maven-compiler-plugin.version>
        <maven-release-plugin.version>2.5.1</maven-release-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.4</nexus-staging-maven-plugin.version>
        <maven-source-plugin.version>2.4</maven-source-plugin.version>
        <maven-javadoc-plugin.version>2.10.1</maven-javadoc-plugin.version>
        <maven-jxr-plugin.version>2.5</maven-jxr-plugin.version>
        <maven-dependency-plugin.version>2.9</maven-dependency-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
        <maven-jaxb2-plugin.version>0.12.3</maven-jaxb2-plugin.version>
        <build-helper-maven-plugin.version>1.9.1</build-helper-maven-plugin.version>
        <maven-resources-plugin.version>2.7</maven-resources-plugin.version>
        <maven-jar-plugin.version>2.5</maven-jar-plugin.version>
        <maven-docck-plugin.version>1.0</maven-docck-plugin.version>
        <site-maven-plugin.version>0.10</site-maven-plugin.version>
    </properties>

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

    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven-plugin-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven-core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${maven-plugin-annotations.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>${plexus-utils.version}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-resources</artifactId>
            <version>${plexus-resources.version}</version>
        </dependency>
        <dependency>
            <groupId>com.labs64.utils</groupId>
            <artifactId>swid-generator</artifactId>
            <version>${swid-generator.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven-enforcer-plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[${maven.version},)</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>[${java.version},)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>${maven-plugin-plugin.version}</version>
                <configuration>
                    <goalPrefix>swid</goalPrefix>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <encoding>utf-8</encoding>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
                <configuration>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release,run-its,reporting</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexus-staging-maven-plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven-gpg-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven-dependency-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven-resources-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <snapshotRepository>
            <id>lmbox-snapshots</id>
            <url>${repo.snapshots.url}</url>
        </snapshotRepository>
        <repository>
            <id>lmbox-releases</id>
            <url>${repo.releases.url}</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>run-its</id>
            <activation>
                <property>
                    <name>maven.test.skip</name>
                    <value>!true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <version>${maven-invoker-plugin.version}</version>
                        <configuration>
                            <debug>true</debug>
                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                            <pomIncludes>
                                <pomInclude>*/pom.xml</pomInclude>
                            </pomIncludes>
                            <preBuildHookScript>setup</preBuildHookScript>
                            <postBuildHookScript>verify</postBuildHookScript>
                            <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                            <settingsFile>src/it/settings.xml</settingsFile>
                            <goals>
                                <goal>clean</goal>
                                <goal>test-compile</goal>
                            </goals>
                        </configuration>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <goals>
                                    <goal>install</goal>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>reporting</id>
            <activation>
                <property>
                    <name>skipReports</name>
                    <value>!true</value>
                </property>
            </activation>
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <version>${maven-invoker-plugin.version}</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <configuration>
                            <quiet>true</quiet>
                            <tagletArtifacts>
                                <tagletArtifact>
                                    <groupId>org.apache.maven.plugin-tools</groupId>
                                    <artifactId>maven-plugin-tools-javadoc</artifactId>
                                    <version>${maven-plugin-plugin.version}</version>
                                </tagletArtifact>
                                <tagletArtifact>
                                    <groupId>org.codehaus.plexus</groupId>
                                    <artifactId>plexus-component-javadoc</artifactId>
                                    <version>${plexus-component-javadoc.version}</version>
                                </tagletArtifact>
                            </tagletArtifacts>
                        </configuration>
                        <reportSets>
                            <reportSet>
                                <reports>
                                    <report>javadoc</report>
                                    <report>test-javadoc</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jxr-plugin</artifactId>
                        <version>${maven-jxr-plugin.version}</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-plugin-plugin</artifactId>
                        <version>${maven-plugin-plugin.version}</version>
                        <configuration>
                            <requirements>
                                <!--
                                NOTE: Maven 2.x does not interpolate properties of the form project.*|pom.* so the Maven Plugin Plugin
                                gets garbage when manually examining the config of the Maven Compiler Plugin.
                                -->
                                <jdk>${mojo.java.target}</jdk>
                            </requirements>
                        </configuration>
                    </plugin>
                </plugins>
            </reporting>
        </profile>
        <profile>
            <id>quality-checks</id>
            <activation>
                <property>
                    <name>skipChecks</name>
                    <value>!true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-docck-plugin</artifactId>
                        <version>${maven-docck-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>docck-check</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>publish-site</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <version>${build-helper-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>pre-site</phase>
                                <goals>
                                    <goal>released-version</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.github.github</groupId>
                        <artifactId>site-maven-plugin</artifactId>
                        <version>${site-maven-plugin.version}</version>
                        <configuration>
                            <message>Generating site for ${project.version}</message>
                            <server>github</server>
                            <noJekyll>true</noJekyll>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                                <phase>site</phase>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>org.eclipse.mylyn.github</groupId>
                                <artifactId>org.eclipse.egit.github.core</artifactId>
                                <version>${org.eclipse.egit.github.core.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
