<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_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.0</version>
    </parent>

	<artifactId>ipp-v3-java-devkit</artifactId>
	<version>5.0.0</version>
	<packaging>jar</packaging>
	<name>IPP V3 Java Devkit - Development Project</name>
	<description>IPP Java V3 DevKit Project - Core</description>

	<properties>
		<sonar.langauge>java</sonar.langauge>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.intuit.quickbooks-online</groupId>
			<artifactId>ipp-v3-java-data</artifactId>
			<version>5.0.0</version>
		</dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>2.2.2</version>
        </dependency>
        <dependency>
            <groupId>asm</groupId>
            <artifactId>asm-commons</artifactId>
            <version>3.3.1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.mail</groupId>
            <artifactId>javax.mail</artifactId>
            <version>1.6.1</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.1</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.2.11</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
            <version>2.2.11</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>
        <dependency>
            <groupId>commons-configuration</groupId>
            <artifactId>commons-configuration</artifactId>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.jaxrs</groupId>
            <artifactId>jackson-jaxrs-json-provider</artifactId>
            <version>2.9.6</version>
        </dependency>
		<dependency>
            <groupId>org.jmockit</groupId>
            <artifactId>jmockit</artifactId>
            <version>1.16</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
			</resource>
		</resources>
		<!-- <finalName>ipp-v3-java-devkit</finalName> -->
		<plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
			<!-- build jar with dependencies -->
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<finalName>${project.artifactId}-${project.version}</finalName>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
				</configuration>
				<executions>
				    <execution>
        				<id>dist-assembly</id>
        				<phase>package</phase>
        				<goals>
            					<goal>single</goal>
        				</goals>
    				    </execution>
				</executions>
			</plugin>
			
			<!-- Surefire plugin before 2.9 version is buggy -->
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.12</version>
				<configuration>
					<suiteXmlFiles>
						<suiteXmlFile>testng-devkit.xml</suiteXmlFile>
					</suiteXmlFiles>
				</configuration>
			</plugin>
			
			
			
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <!-- <version>0.7.6-SNAPSHOT</version> -->
                <version>0.7.6.201602180812</version>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <rule implementation="org.jacoco.maven.RuleConfiguration">
                                    <element>BUNDLE</element>
                                    <limits>
                                        <limit implementation="org.jacoco.report.check.Limit">
                                            <counter>COMPLEXITY</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.30</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
	      <id>noTest</id>
	      <build>
	        <plugins>
	          <plugin>
	            <groupId>org.apache.maven.plugins</groupId>
	            <artifactId>maven-surefire-plugin</artifactId>
	            <version>2.4.2</version>
	            <configuration>
	              <skipTests>true</skipTests>
	            </configuration>
	          </plugin>
	        </plugins>
	      </build>
	    </profile>
	    <profile>
	      <id>intTest</id>
	      <build>
	        <plugins>
	          <plugin>
	            <groupId>org.apache.maven.plugins</groupId>
	            <artifactId>maven-surefire-plugin</artifactId>
	            <version>2.4.2</version>
	            <configuration>
	              <suiteXmlFiles>
                        <suiteXmlFile>testng.xml</suiteXmlFile>
                  </suiteXmlFiles>
	            </configuration>
	          </plugin>
	        </plugins>
	      </build>
	    </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>