<!--
    Copyright (C) 2012 the original author or authors.
    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">
	<modelVersion>4.0.0</modelVersion>
	<groupId>net.binggl</groupId>
	<artifactId>ninja-google-oauth-module</artifactId>
	<version>1.0.0</version>
	<packaging>jar</packaging>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<ninjaframework.version>5.2.1</ninjaframework.version>
		<pac4j.version>1.7.0</pac4j.version>
	</properties>
	<name>Ninja Framework Google oauth2 Module</name>
	<description>
	This is a plugable module for the Ninja web framework which supports Google oauth2 authentication.
	</description>
	<url>https://github.com/bihe/ninja-google-oauth</url>
	<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>Henrik Binggl</name>
			<email>henrik@binggl.net</email>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:git@github.com:bihe/bihe/ninja-google-oauth.git</connection>
		<developerConnection>scm:git:git@github.com:bihe/bihe/ninja-google-oauth.git</developerConnection>
		<url>git@github.com:bihe/ninja-google-oauth.git</url>
		<tag>HEAD</tag>
	</scm>
	<distributionManagement>
	  <snapshotRepository>
	    <id>ossrh</id>
	    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
	  </snapshotRepository>
	</distributionManagement>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<debug>false</debug>
					<optimize>true</optimize>
				</configuration>
			</plugin>		
			 
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			 
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>sonar-maven-plugin</artifactId>
				<version>2.6</version>
			</plugin>			
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			 
			<plugin>
		      <groupId>org.sonatype.plugins</groupId>
		      <artifactId>nexus-staging-maven-plugin</artifactId>
		      <version>1.6.3</version>
		      <extensions>true</extensions>
		      <configuration>
		        <serverId>ossrh</serverId>
		        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
		        <autoReleaseAfterClose>false</autoReleaseAfterClose>
		      </configuration>
		    </plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.2</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<goals>deploy</goals>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>2.2</version>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>org.ninjaframework</groupId>
			<artifactId>ninja-core</artifactId>
			<version>${ninjaframework.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>18.0</version>
		</dependency>
		<dependency>
			<groupId>org.ninjaframework</groupId>
		    <artifactId>ninja-test-utilities</artifactId>
		    <version>${ninjaframework.version}</version>
			<scope>test</scope>
		</dependency>
		<!-- authentication with oauth -->
        <dependency>
			<groupId>org.pac4j</groupId>
			<artifactId>pac4j-oauth</artifactId>
			<version>${pac4j.version}</version>
			<exclusions>
				<!-- exclude jackson - already present -->
		        <exclusion>
		          <groupId>com.fasterxml.jackson.core</groupId> 
		          <artifactId>jackson-databind</artifactId>
		        </exclusion>
		        <exclusion>
		          <groupId>com.fasterxml.jackson.core</groupId> 
		          <artifactId>jackson-annotations</artifactId>
		        </exclusion>
		  	</exclusions>
		</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.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
