<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.freehep</groupId>
  <artifactId>freehep-io</artifactId>
  <version>2.2.2</version>

  <name>FreeHEP IO</name>
  <description>FreeHEP extension to the java.io library</description>
  <url>http://freehep.github.com/freehep-io</url>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
    <license>
      <name>LGPL 2</name>
      <url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
      <distribution>repo</distribution>
      <comments>GNU Lesser General Public License</comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>duns</id>
      <name>Mark Donszelmann</name>
      <email>Mark.Donszelmann@gmail.com</email>
      <url>http://duns.github.com</url>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <id>tonyj</id>
      <name>Tony Johnson</name>
      <email>tonyj@slac.stanford.edu</email>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>-8</timezone>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/freehep/freehep-io.git</connection>
    <developerConnection>scm:git:git@github.com:freehep/freehep-io.git</developerConnection>
    <url>http://github.com/freehep/freehep-io</url>
    <tag>freehep-io-2.2.2</tag>
  </scm>

  <issueManagement>
    <system>github</system>
    <url>https://github.com/freehep/freehep-io/issues</url>
  </issueManagement>

  <properties>
    <github.global.server>github</github.global.server>
    <mavenVersion>3.0.0</mavenVersion>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>FreeHEP Release Repository</name>
      <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>FreeHEP Snapshot Repository</name>
      <url>http://oss.sonatype.org/content/repositories/freehep-snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

  <build>
    <defaultGoal>install</defaultGoal>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <optimize>true</optimize>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.3.2</version>
	<configuration>
          <mavenExecutorId>forked-path</mavenExecutorId>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.5.1</version>
      </plugin>

    <plugin>
      <groupId>com.github.github</groupId>
      <artifactId>site-maven-plugin</artifactId>
      <version>0.7</version>
      <configuration>
        <message>Creating site for ${project.version}</message>
      </configuration>
      <executions>
        <execution>
          <goals>
            <goal>site</goal>
          </goals>
<!-- should be site-deploy, but this tries to upload the site to distributionManagement site -->
          <phase>site</phase>
        </execution>
      </executions>
    </plugin>

    <plugin>
      <groupId>com.github.github</groupId>
      <artifactId>downloads-maven-plugin</artifactId>
      <version>0.6</version>
      <configuration>
        <description>${project.version} release of ${project.name}</description>
        <override>true</override>
        <includeAttached>true</includeAttached>
      </configuration>
      <executions>
        <execution>
          <goals>
            <goal>upload</goal>
          </goals>
          <phase>deploy</phase>
        </execution>
      </executions>    
    </plugin>
 
   </plugins>
  </build>

  <dependencies>
     <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.10</version>
     </dependency>
  </dependencies>

  <profiles>
    <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>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <inherited>true</inherited>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <inherited>true</inherited>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <inherited>true</inherited>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>2.7</version>
            <configuration>
              <updateReleaseInfo>true</updateReleaseInfo>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
