<?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">

	<parent>
		<groupId>com.atlassian</groupId>
		<artifactId>jira-portfolio-main</artifactId>
		<version>1.9.2-OD-001-D20150415T095517</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<modelVersion>4.0.0</modelVersion>
    <artifactId>jira-portfolio-jira-common</artifactId>
	<version>1.9.2-OD-001-D20150415T095517</version>

	<name>JIRA Portfolio [JIRA Commons]</name>
    <properties>
        <includes></includes>
    </properties>

   	<dependencies>

		<!-- commons -->
		<dependency>
			<groupId>com.atlassian</groupId>
			<artifactId>jira-portfolio-common</artifactId>
			<version>${project.version}</version>
		</dependency>

		<!-- greenhopper api -->

		<dependency>
			<groupId>com.atlassian.jira.plugins</groupId>
			<artifactId>jira-greenhopper-api</artifactId>
			<version>${jira.agile.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.atlassian.jira.plugins</groupId>
			<artifactId>jira-greenhopper-plugin</artifactId>
			<version>${jira.agile.version}</version>
			<scope>provided</scope>
		</dependency>
		
		<!-- inherited dependencies; versions specified in common.pom -->

		<dependency>
			<groupId>com.atlassian.jira</groupId>
			<artifactId>jira-api</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.atlassian.jira</groupId>
			<artifactId>jira-core</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>

		<!-- OBH: add dependency to active objects acc. to https://developer.atlassian.com/display/DOCS/Getting+Started+with+Active+Objects -->

		<dependency>
			<groupId>com.atlassian.activeobjects</groupId>
			<artifactId>activeobjects-plugin</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.atlassian.sal</groupId>
			<artifactId>sal-api</artifactId>
			<version>2.4.1</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.4</version>
			<scope>provided</scope>
		</dependency>

		<!-- Licensing -->
		<dependency>
		    <groupId>com.atlassian.upm</groupId>
		    <artifactId>licensing-api</artifactId>
		    <version>2.0.1</version>
		    <scope>provided</scope>
		</dependency>
		
		<dependency>
		    <groupId>com.atlassian.upm</groupId>
		    <artifactId>upm-api</artifactId>
		    <version>2.0.1</version>
		    <scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
		</dependency>

		<!-- POCKETKNIFE LOGGING -->

		<dependency>
			<groupId>com.atlassian.pocketknife</groupId>
			<artifactId>jira-pocketknife-enablement</artifactId>
		</dependency>

		<!-- should be required by pocketknife! -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>

		<!-- ATLASSIAN Spring Scanner -->
		<!-- https://bitbucket.org/atlassian/atlassian-spring-scanner -->

		<!--
			This is for the annotations you need to indicate components and OSGI services.
		-->
		<dependency>
			<groupId>com.atlassian.plugin</groupId>
			<artifactId>atlassian-spring-scanner-annotation</artifactId>
			<version>${atlassian.spring.scanner.version}</version>
			<scope>compile</scope>
		</dependency>

	</dependencies>

    <build>

        <plugins>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>

			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>

			<plugin>
				<groupId>com.atlassian.maven.plugins</groupId>
				<artifactId>maven-clover2-plugin</artifactId>
				<configuration>
					<licenseLocation>${basedir}/../builds/clover.license</licenseLocation>
					<contextFilters>property,constructor,static</contextFilters>
                    <includesList>${includes}</includesList>
				</configuration>
				<executions>
					<execution>
						<id>setup</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>instrument</goal>
						</goals>
						<configuration>
							<!--<includesTestSourceRoots>false</includesTestSourceRoots>-->
						</configuration>
					</execution>
					<execution>
						<id>aggregate</id>
						<phase>package</phase>
						<goals>
							<goal>aggregate</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>clover</goal>
						</goals>
					</execution>
					<execution>
						<id>check</id>
						<phase>verify</phase>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>

							<targetPercentage>39.0000%</targetPercentage>
							<methodPercentage>34.0000%</methodPercentage>
							<statementPercentage>41.0000%</statementPercentage>
							<conditionalPercentage>38.0000%</conditionalPercentage>

							<!--Started at (20 Mar 2015)-->
							<!--[ERROR] Total coverage of 39.9740% did not meet target of 100.0000%-->
							<!--[ERROR] Method coverage of 34.7222% did not meet target of 100.0000%-->
							<!--[ERROR] Statement coverage of 41.3897% did not meet target of 100.0000%-->
							<!--[ERROR] Conditional coverage of 38.3459% did not meet target of 100.0000%-->

							<!--Started at (13 Feb 2015):-->
                            <!--[ERROR] Total coverage of 24.9725% did not meet target of 100.0000%-->
                            <!--[ERROR] Method coverage of 24.2424% did not meet target of 100.0000%-->
                            <!--[ERROR] Statement coverage of 26.8690% did not meet target of 100.0000%-->
                            <!--[ERROR] Conditional coverage of 20.3216% did not meet target of 100.0000%-->

						</configuration>
					</execution>
				</executions>
			</plugin>

        </plugins>
    </build>

	<profiles>
		<profile>
		<id>jira-it</id>
		<activation>
			<property>
				<name>jiraIT</name>
			</property>
		</activation>

		<build>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<configuration>
						<skipTests>true</skipTests>
					</configuration>
				</plugin>
			</plugins>
			</build>
		</profile>
	</profiles>

</project>
