<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.github.simondan</groupId>
  <artifactId>ojcms-server</artifactId>
  <version>0.1-beta</version>
  <packaging>pom</packaging>

  <name>${project.groupId}:${project.artifactId}</name>
  <url>https://github.com/SimonDan/ojcms-server</url>
  <description>java-framework for a serverside cms</description>

  <licenses>
    <license>
      <name>GNU General Public License (GPL)</name>
      <url>http://www.gnu.org/licenses/gpl.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>sdanner</id>
      <name>Simon Danner</name>
      <email>simon.danner@gmx.de</email>
      <timezone>1</timezone>
    </developer>
  </developers>

  <scm>
    <connection>https://github.com/SimonDan/ojcms-server.git</connection>
    <developerConnection>git@github.com:SimonDan/ojcms-server.git</developerConnection>
    <url>https://github.com/SimonDan/ojcms-server</url>
  </scm>

  <issueManagement>
    <url>https://github.com/SimonDan/ojcms-server/issues</url>
    <system>github</system>
  </issueManagement>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <modules>
    <module>annotationprocessor</module>
    <module>common</module>
    <module>database</module>
    <module>server</module>
  </modules>

  <properties>
    <version.jersey>2.25.1</version.jersey>
  </properties>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.1</version>
            <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>2.9.1</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.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.5</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencies>

    <dependency>
      <groupId>com.intellij</groupId>
      <artifactId>annotations</artifactId>
      <version>5.1</version>
    </dependency>

    <dependency>
      <groupId>com.github.simondan</groupId>
      <artifactId>ojcms-beans</artifactId>
      <version>0.1-beta</version>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.2</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <configuration>
          <archive>
            <manifest>
              <useUniqueVersions>true</useUniqueVersions>
              <addClasspath>true</addClasspath>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
            <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
        </configuration>
      </plugin>

    </plugins>
  </build>

</project>