<?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>
    <parent>
        <groupId>at.rseiler.pom-project</groupId>
        <artifactId>pom</artifactId>
        <version>1.0</version>
    </parent>

    <groupId>at.rseiler.spbee</groupId>
    <artifactId>spbee</artifactId>
    <packaging>pom</packaging>
    <version>1.0</version>
    <name>spBee</name>
    <description>
        The spBee project which contains the core module, the demo module and the documentation.
    </description>

    <modules>
        <module>spbee-core</module>
        <!--<module>spbee-demo</module>-->
    </modules>

    <properties>
        <!-- multi project config -->
        <main.basedir>${project.basedir}</main.basedir>
        <skipDependencyPlugin>false</skipDependencyPlugin>

        <github-uri>https://github.com/rseiler/spbee.git</github-uri>
        <git-uri>git:${github-uri}</git-uri>

        <java.version>1.8</java.version>
        <spring.version>4.1.5.RELEASE</spring.version>
        <hsqldb.version>2.3.2</hsqldb.version>
        <commons-io.version>1.3.2</commons-io.version>
        <log4j.version>1.2.17</log4j.version>
        <maven-compiler-plugin.version>3.2</maven-compiler-plugin.version>
        <maven-clean-plugin.version>2.5</maven-clean-plugin.version>
        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <maven-javadoc-plugin.version>2.10.1</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
        <maven-source-plugin.version>2.4</maven-source-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.3</nexus-staging-maven-plugin.version>
        <maven-scm-publish-plugin.version>1.1</maven-scm-publish-plugin.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <version>${maven-scm-publish-plugin.version}</version>
                <inherited>true</inherited>
                <configuration>
                    <checkoutDirectory>${project.basedir}/github.com</checkoutDirectory>
                    <checkinComment>publishing site documentation</checkinComment>
                    <content>${env.HOME}/sitedocs/spbee</content>
                    <pubScmUrl>scm:${git-uri}</pubScmUrl>
                    <scmBranch>gh-pages</scmBranch>
                </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>false</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <inherited>true</inherited>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <inherited>true</inherited>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>${maven-deploy-plugin.version}</version>
                        <inherited>true</inherited>
                        <configuration>
                            <updateReleaseInfo>true</updateReleaseInfo>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <scm>
        <url>${github-uri}</url>
        <connection>scm:${git-uri}</connection>
        <developerConnection>scm:${git-uri}</developerConnection>
      <tag>HEAD</tag>
  </scm>

    <distributionManagement>
        <site>
            <id>site-docs</id>
            <url>file://${env.HOME}/sitedocs/spbee</url>
        </site>
        <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>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>rseiler</id>
            <name>Reinhard Seiler</name>
            <email>rseiler.developer@gmail.com</email>
            <roles>
                <role>architect</role>
            </roles>
        </developer>
    </developers>

</project>