<?xml version="1.0" encoding="UTF-8"?>

<!--
    Copyright (c) 2017 Intuit
     
    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>
    <parent>
        <artifactId>ipp-v3-java-devkit-pom</artifactId>
        <groupId>com.intuit.quickbooks-online</groupId>
        <version>5.0.5</version>
    </parent>
  <artifactId>ipp-java-qbapihelper</artifactId>
  <packaging>jar</packaging>
  <name>Quickbooks API Helper for Oauth</name>
  <description>Quickbooks API Helper Project for OAuth, Disconnect and Reconnect</description>
	<dependencies>
		<dependency>
			<groupId>org.openid4java</groupId>
			<artifactId>openid4java</artifactId>
			<version>0.9.8</version>
		</dependency>
		<dependency>
            <groupId>net.sf.kxml</groupId>
            <artifactId>kxml2</artifactId>
            <version>2.2.2</version>
        </dependency>	
        <dependency>
            <groupId>oauth.signpost</groupId>
            <artifactId>signpost-core</artifactId>
            <version>1.2.1.1</version>
        </dependency>
        <dependency>
            <groupId>oauth.signpost</groupId>
            <artifactId>signpost-commonshttp4</artifactId>
            <version>1.2</version>
        </dependency>	
	</dependencies>

	<build>
		<!--<finalName>ipp-java-qbhelper</finalName> -->
		<testResources>
			<testResource>
				<directory>${basedir}/src/test/resources</directory>
			</testResource>
		</testResources>
		<resources>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
			</resource>
		</resources>

		<plugins>
			<!-- This plug-in instructs to use the mentioned JDK for compilation Reference:- 
				http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.5.1</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifest>
							<mainClass>fully.qualified.MainClass
							</mainClass>
						</manifest>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<finalName>${project.artifactId}-${project.version}</finalName>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
				</configuration>
				<executions>
					<execution>
						<id>qb-helper</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>

	<profiles>
		<profile>
			<properties>
				<test.suite>testng.xml</test.suite>
			</properties>
		</profile>
		<profile>
	      <id>sign</id>
	      <build>
	      	<plugins>
		        <!-- build javadocs jar -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.9</version>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<!-- build sources jar -->
				<plugin>
			      <groupId>org.apache.maven.plugins</groupId>
			      <artifactId>maven-source-plugin</artifactId>
			      <version>2.2.1</version>
			      <executions>
			        <execution>
			          <id>attach-sources</id>
			          <goals>
			            <goal>jar-no-fork</goal>
			          </goals>
			        </execution>
			      </executions>
			    </plugin>
			</plugins>
	      </build>
	    </profile>
	</profiles>
</project>