<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.thorbenlindhauer</groupId>
  <artifactId>graphmod-parent</artifactId>
  <version>0.1.0</version>
  <packaging>pom</packaging>
  <name>Graphical Models - Parent</name>
  <description>A Java library for performing inference in graphical models (Bayesian and Markov networks) and learning 
    distribution parameters.</description>
  <url>https://github.com/ThorbenLindhauer/graphical-models</url>
  
  <modules>
    <module>inference-engine</module>
    <module>import</module>
    <module>learning</module>
    <module>integration</module>
  </modules>
  
  <properties>
    <plugin.version.source>2.3</plugin.version.source>
    <plugin.version.javadoc>2.9.1</plugin.version.javadoc>
    <plugin.version.deploy>2.8.2</plugin.version.deploy>
    <plugin.version.nexus-staging>1.6.4</plugin.version.nexus-staging>
    <plugin.version.gpg>1.4</plugin.version.gpg>
    <plugin.version.release>2.5.1</plugin.version.release>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
      </dependency>
    
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>1.6.1</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  
  <developers>
    <developer>
      <name>Thorben Lindhauer</name>
      <url>https://github.com/ThorbenLindhauer</url>
    </developer>
  </developers>
  
  <scm>
    <connection>scm:git:git@github.com:ThorbenLindhauer/graphical-models.git</connection>
    <developerConnection>scm:git:git@github.com:ThorbenLindhauer/graphical-models.git</developerConnection>
    <url>https://github.com/ThorbenLindhauer/graphical-models</url>
    <tag>0.1.0</tag>
  </scm>
  
  <profiles>
    <!-- activate this profile to release to maven central -->
    <profile>
      <id>sonatype-oss-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${plugin.version.gpg}</version>
<!--             <configuration> -->
<!--               <passphrase>${gpg.passphrase}</passphrase> -->
<!--             </configuration> -->
			<configuration>
			  <useAgent>true</useAgent>
			</configuration>
            <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>${plugin.version.nexus-staging}</version>
            <executions>
              <execution>
                <id>central-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
                <configuration>
                  <serverId>central</serverId>
                  <nexusUrl>https://oss.sonatype.org</nexusUrl>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>${plugin.version.deploy}</version>
            <executions>
              <execution>
                <id>default-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
                <configuration>
                  <skip>true</skip>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${plugin.version.release}</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${plugin.version.source}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
          <execution>
            <id>attach-test-sources</id>
            <phase>package</phase>
            <goals>
              <goal>test-jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${plugin.version.javadoc}</version>
        <configuration>
          <quiet>true</quiet>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
          </execution>
        </executions>
      </plugin>  
    </plugins>
  </build>
</project>