<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ vi:ts=4 sw=4 et ai:
-->
<!--
  ~ Copyright (C) 2013 tarent AG
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining
  ~ a copy of this software and associated documentation files (the
  ~ "Software"), to deal in the Software without restriction, including
  ~ without limitation the rights to use, copy, modify, merge, publish,
  ~ distribute, sublicense, and/or sell copies of the Software, and to
  ~ permit persons to whom the Software is furnished to do so, subject to
  ~ the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be
  ~ included in all copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  ~ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  ~ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  ~ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  ~ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  ~ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  ~ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  -->
<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>
    <!-- refer to sonatype parent pom for publishment to maven central -->
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>org.osiam</groupId>
    <artifactId>scim-schema</artifactId>
    <name>scim-schema</name>
    <packaging>jar</packaging>

    <version>0.22</version>

    <description>SCIM conform data types used by OSIAM services and OSIAM connector4Java for data exchange</description>
    <licenses>
        <license>
            <name>The MIT License (MIT)</name>
            <url>http://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.7</java.version>
	<clover.version>3.1.11</clover.version>
    </properties>

    <scm>
        <connection>scm:git://git@github.com/osiam/scim-schema.git</connection>
        <url>git@github.com/osiam/scim-schema.git</url>
        <developerConnection>scm:git:ssh://git@github.com/osiam/scim-schema.git</developerConnection>
      <tag>scim-schema-0.22</tag>
  </scm>

    <developers>
        <developer>
            <id>trossn</id>
            <name>Thorsten Rossner</name>
            <email>info@osiam.org</email>
            <timezone>+1</timezone>
            <organization>OSIAM</organization>
        </developer>
    </developers>

    <dependencies>
        <!-- JSON -->
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.9</version>
        </dependency>

        <!-- Used to convert ISO DateTime Strings to Date and vice versa (APACHE 2 License)-->
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.2</version>
        </dependency>
        <dependency>
            <groupId>org.joda</groupId>
            <artifactId>joda-convert</artifactId>
            <version>1.3.1</version>
        </dependency>

        <!-- Groovy SDK LICENSE: Apache 2.0 according to http://grepcode.com/snapshot/repo1.maven.org/maven2/org.codehaus.groovy/groovy-all/2.0.4 -->
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>2.1.1</version>
            <scope>test</scope>
        </dependency>

        <!-- Spock testing framework for all kinds of tests LICENSE: Apache 2.0 according to http://code.google.com/p/spock/ -->
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>0.7-groovy-2.0</version>
            <scope>test</scope>
        </dependency>
        <!-- Support for mocking concrete classes within Spock LICENSE: Apache 2.0 according to source package -->
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>2.2.2</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
    <build>
        <plugins>
            <!-- Needed to publish releases to sonatype staging repo -->
            <!-- which leads to maven central -->
            <!-- Note: In order for this to work you need to have the -->
            <!-- appropriate server tag in your .m2/settings.xml -->
            <!-- with your username/password for the sonatype jira -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.4.4</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <serverId>sonatype-nexus-staging</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                </configuration>
            </plugin>

            <!-- call as "mvn verify -Dgpg.passphrase=thephrase" or set -Dgpg.skip=true -->
            <!-- If not given, gpg passphrase has to be provided interactively -->
            <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>

            <!-- Configure the compiler plugin for Groovy -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <extensions>true</extensions>
                <configuration>
                    <compilerId>groovy-eclipse-compiler</compilerId>
                    <verbose>false</verbose>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-batch</artifactId>
                        <version>2.0.6-01</version>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-compiler</artifactId>
                        <version>2.7.0-01</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!-- Surefire: will execute all unit tests including Spock specs and will ignore system tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.13</version>
                <configuration>
                    <includes>
                        <include>**/*Test.*</include>
                        <include>**/*Spec.*</include>
                    </includes>
                </configuration>
            </plugin>
            <!-- Coverage reports for sonar -->
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-clover2-plugin</artifactId>
                <version>${clover.version}</version>
                <configuration>
                    <generatePdf>true</generatePdf>
                    <generateXml>true</generateXml>
                    <generateJson>false</generateJson>
                    <generateHtml>true</generateHtml>
                    <jdk>${java.version}</jdk>
                </configuration>
            </plugin>

            <!-- During release:perform, enable the "release" profile -->
            <!--
              ~ Extra parameters are passed using the "release.arguments" property on the command line.
              ~ In Jenkins configure Maven release build / Release goals and options (in one line):
              ~     -Dresume=false  release:clean release:prepare release:perform 
              ~     -Drelease.arguments="-Dgpg.passphrase=$PASSPHRASE -Dgpg.keyname=Signing\\ Key "
              ~ (Take care of proper quoting/escaping: Spaces within the key's uid have to be escaped!)
            -->
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <releaseProfiles>sonatype-oss-release</releaseProfiles>
                    <arguments>-Psonatype-oss-release ${release.arguments} </arguments>
                    <goals>deploy</goals>
                </configuration>
            </plugin>

            <!-- Needed due to a problem with SSH -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.5</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-ssh</artifactId>
                        <version>1.0-beta-7</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>

            <!-- Build Helper: will add Groovy sources to path -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${basedir}/src/main/groovy</source>
                                <source>${basedir}/src/main/java</source>
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-test-source</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${basedir}/src/test/groovy</source>
                                <source>${basedir}/src/test/java</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
