<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>org.italiangrid</groupId>
  <artifactId>voms-api-java</artifactId>
  <version>3.0.0</version>
  <packaging>jar</packaging>

  <name>voms-api-java</name>
  <description>Java APIs to validate and request VOMS attribute certificates</description>

  <url>https://github.com/italiangrid/voms-api-java</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <url>https://github.com/italiangrid/voms-api-java</url>
    <connection>scm:git:git://github.com/italiangrid/voms-api-java.git</connection>
    <developerConnection>scm:git:ssh://git@github.com:italiangrid/voms-api-java.git</developerConnection>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <assembly.java.dir>/usr/share/java</assembly.java.dir>
    <assembly.doc.dir>/usr/share/doc/${project.name}</assembly.doc.dir>
    <assembly.javadoc.dir>/usr/share/javadoc/${project.name}</assembly.javadoc.dir>
    <junitVersion>4.10</junitVersion>
    <canlVersion>1.1.0</canlVersion>
    <bcVersion>1.46</bcVersion>
    <licensePluginVersion>1.9.0</licensePluginVersion>
    <releasePluginVersion>2.2.2</releasePluginVersion>
    <coberturaPluginVersion>2.5.2</coberturaPluginVersion>
  </properties>

  <developers>
    <developer>
      <id>andreac</id>
      <name>Andrea Ceccanti</name>
      <email>andrea.ceccanti@cnaf.infn.it</email>
      <organization>INFN CNAF</organization>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>vventuri</id>
      <name>Valerio Venturi</name>
      <email>valerio.venturi@cnaf.infn.it</email>
      <organization>INFN CNAF</organization>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>dandreotti</id>
      <name>Daniele Andreotti</name>
      <email>daniele.andreotti@cnaf.infn.it</email>
      <organization>INFN CNAF</organization>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
  </developers>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>${coberturaPluginVersion}</version>
        <configuration>
          <formats>
            <format>html</format>
            <format>xml</format>
          </formats>
          <instrumentation>
            <excludes>
              <exclude>org/italiangrid/voms/test/**/*.class</exclude>
              <exclude>org/italiangrid/voms/examples/**/*.class</exclude>
            </excludes>
          </instrumentation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <finalName>${project.name}</finalName>
          <descriptors>
            <descriptor>${basedir}/src/main/assembly/voms-api-java.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <outputDirectory>${project.build.directory}/javadoc</outputDirectory>
          <reportOutputDirectory>${project.reporting.outputDirectory}/javadoc</reportOutputDirectory>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>site</phase>
            <goals>
              <goal>aggregate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <version>${licensePluginVersion}</version>
        <configuration>
          <header>src/license/license.txt</header>
          <excludes>
            <exclude>*.md</exclude>
            <exclude>Makefile</exclude>
            <exclude>AUTHORS</exclude>
            <exclude>LICENSE</exclude>
            <exclude>.gitignore</exclude>
            <exclude>spec/**</exclude>
            <exclude>src/test/resources/**</exclude>
            <exclude>src/config/**</exclude>
            <exclude>src/main/java/org/glite/voms/FQAN.java</exclude>
          </excludes>
          <useDefaultExcludes>true</useDefaultExcludes>
        </configuration>
        <executions>
          <execution>
            <id>check-headers</id>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${releasePluginVersion}</version>
        <configuration>
          <mavenExecutorId>forked-path</mavenExecutorId>
        </configuration>
      </plugin>
    </plugins>
  </build>



  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junitVersion}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>eu.eu-emi.security</groupId>
      <artifactId>canl</artifactId>
      <version>${canlVersion}</version>
    </dependency>

    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcmail-jdk16</artifactId>
      <version>${bcVersion}</version>
    </dependency>

    <dependency>
      <groupId>net.jcip</groupId>
      <artifactId>jcip-annotations</artifactId>
      <version>1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </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>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>local-staging</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <distributionManagement>
        <repository>
          <id>cnaf-releases</id>
          <name>CNAF releases</name>
          <url>http://radiohead.cnaf.infn.it:8081/nexus/content/repositories/cnaf-releases/</url>
        </repository>

        <snapshotRepository>
          <id>cnaf-snapshots</id>
          <name>CNAF snapshots</name>
          <url>http://radiohead.cnaf.infn.it:8081/nexus/content/repositories/cnaf-snapshots/</url>
        </snapshotRepository>

      </distributionManagement>
    </profile>

    <profile>
      <id>central-staging</id>
      <distributionManagement>
        <repository>
          <id>sonatype-nexus-staging</id>
          <name>Nexus Release Repository</name>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
    </profile>
  </profiles>
</project>
