<?xml version="1.0" encoding="UTF-8"?>
<!--

          Copyright 2010 Newcastle University
              Maciej Machulak, Lukasz Moren

             http://research.ncl.ac.uk/smart/

      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.

-->

<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">
    <name>OAuth 2.0 library - Parent</name>
    <groupId>net.smartam.leeloo</groupId>
    <artifactId>oauth2-parent</artifactId>
    <version>0.1</version>
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>5</version>
    </parent>

    <modules>
        <module>oauth2-common</module>
        <module>oauth2-authzserver</module>
        <module>oauth2-client</module>
        <module>oauth2-httpclient4</module>
        <module>oauth2-resourceserver</module>
        <module>oauth2-rs-filter</module>
        <module>oauth2-dynamicreg-client</module>
        <module>oauth2-dynamicreg-server</module>
        <module>oauth2-dynamicreg-common</module>
        <module>oauth2-integration-tests</module>
        <module>oauth2-demo</module>
    </modules>

    <properties>
        <java.version>1.6</java.version>
        <cxf.version>2.2.10</cxf.version>
        <spring.version>3.0.2.RELEASE</spring.version>
        <spring-mock.version>2.0.8</spring-mock.version>
        <easy-mock.version>3.0</easy-mock.version>
        <servlet-api.version>2.5</servlet-api.version>
        <junit.version>4.8.1</junit.version>
        <jettison.version>1.2</jettison.version>
        <jetty.version>7.1.5.v20100705</jetty.version>
        <pmd.version>2.5</pmd.version>
        <sonatypeOssDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots/
        </sonatypeOssDistMgmtSnapshotsUrl>
    </properties>

    <developers>
        <developer>
            <name>Maciej Machulak</name>
        </developer>
        <developer>
            <name>Lukasz Moren</name>
        </developer>
    </developers>

    <url>http://leeloo.smartam.net</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>
        <connection>scm:hg:http://bitbucket.org/smartproject/oauth-2.0</connection>
        <developerConnection>scm:hg:https://bitbucket.org/smartproject/oauth-2.0</developerConnection>
        <url>http://bitbucket.org/smartproject/oauth-2.0</url>
    </scm>

    <issueManagement>
        <system>bitbucket</system>
        <url>http://bitbucket.org/smartproject/oauth-2.0/issues</url>
    </issueManagement>

    <dependencies>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.1</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.6.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-mock</artifactId>
            <version>${spring-mock.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>${easy-mock.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>${servlet-api.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>2.2-beta-5</version>
                        <executions>
                            <execution>
                                <id>make-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <runOnlyAtExecutionRoot>false</runOnlyAtExecutionRoot>
                                    <descriptors>
                                        <descriptor>assembly.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <finalName>oauth-parent</finalName>
        <defaultGoal>install</defaultGoal>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.0</version>
                    <configuration>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <useReleaseProfile>false</useReleaseProfile>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <arguments>-Psonatype-oss-release</arguments>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.8.0</version>
                <configuration>
                    <strictCheck>true</strictCheck>
                    <basedir>${project.basedir}</basedir>
                    <header>license.txt</header>
                    <quiet>false</quiet>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>true</aggregate>
                    <excludes>
                        <exclude>target/**</exclude>
                        <exclude>**/target/**</exclude>
                        <exclude>**/.hg/**</exclude>
                        <exclude>.clover/**</exclude>
                        <exclude>**/*.class</exclude>
                        <exclude>**/*.iml</exclude>
                        <exclude>**/*.ipr</exclude>
                        <exclude>**/*.iws</exclude>
                    </excludes>
                    <useDefaultExcludes>false</useDefaultExcludes>
                    <mapping>
                        <jwc>XML_STYLE</jwc>
                        <xml>XML_STYLE</xml>
                        <application>XML_STYLE</application>
                        <myFileExtension>JAVADOC_STYLE</myFileExtension>
                    </mapping>
                    <useDefaultMapping>true</useDefaultMapping>
                    <properties>
                        <year>2010</year>
                        <www>http://research.ncl.ac.uk/smart/</www>
                        <author1>Maciej Machulak</author1>
                        <author2>Lukasz Moren</author2>
                    </properties>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0-beta-1</version>
                <executions>
                    <execution>
                        <id>enforce-java</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <rules>
                        <requireJavaVersion>
                            <!-- require JDK 1.6 to run the build -->
                            <version>[1.6,)</version>
                        </requireJavaVersion>
                    </rules>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Specification-Title>${project.name}</Specification-Title>
                            <Specification-Vendor>SMART - Newcastle University</Specification-Vendor>
                            <Specification-Version>${project.version}</Specification-Version>
                            <Implementation-Title>${project.name}</Implementation-Title>
                            <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
                            <Implementation-Vendor>SMART - Newcastle University</Implementation-Vendor>
                            <Implementation-Version>${project.version}</Implementation-Version>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <extensions>
            <extension>
                <groupId>org.jvnet.wagon-svn</groupId>
                <artifactId>wagon-svn</artifactId>
                <version>1.9</version>
            </extension>
        </extensions>
    </build>

    <repositories>
        <repository>
            <id>jboss-releases-repository</id>
            <name>JBoss Releases Repository</name>
            <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
        </repository>
        <repository>
            <id>apache-snapshot</id>
            <name>apache-snapshots</name>
            <url>http://repository.apache.org/snapshots/</url>
        </repository>
        <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven</name>
            <url>http://download.java.net/maven/2/</url>
        </repository>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>
                https://oss.sonatype.org/content/repositories/snapshots
            </url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>
                https://oss.sonatype.org/service/local/staging/deploy/maven2/
            </url>
        </repository>
    </distributionManagement>

</project>