<?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>
		<groupId>com.atlassian.jira.plugins</groupId>
		<artifactId>jira-importers</artifactId>
        <version>7.0.17</version>
	</parent>
	<artifactId>jira-importers-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

	<dependencies>
		<!-- Provided -->
		<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>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>

		<dependency>
			<groupId>com.atlassian.jira.plugins</groupId>
			<artifactId>jira-greenhopper-plugin</artifactId>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>sql-maven-plugin</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.atlassian.templaterenderer</groupId>
			<artifactId>atlassian-template-renderer-api</artifactId>
			<version>1.4.0</version>
			<scope>provided</scope>
		</dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <version>2.7.2-bbain1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jdom</groupId>
            <artifactId>jdom</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
            <version>${spring.scanner.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-processor</artifactId>
            <version>${spring.scanner.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-runtime</artifactId>
            <version>${spring.scanner.version}</version>
            <scope>runtime</scope>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
            <version>6.1.25</version>
            <scope>test</scope>
        </dependency>
		<dependency>
			<groupId>com.atlassian.jira</groupId>
			<artifactId>jira-tests</artifactId>
			<scope>test</scope>
		</dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>


        <!-- Bundled dependencies-->
        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.1</version>
            <exclusions>
                <exclusion>
                    <groupId>jdom</groupId>
                    <artifactId>jdom</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xom</groupId>
                    <artifactId>xom</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
			<groupId>com.atlassian.uwc</groupId>
			<artifactId>uwc</artifactId>
			<version>3.13.0</version>
		</dependency>
		<dependency>
			<groupId>org.xerial</groupId>
			<artifactId>sqlite-jdbc</artifactId>
			<version>3.7.2</version>
            <exclusions>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.sf.supercsv</groupId>
            <artifactId>super-csv</artifactId>
            <version>2.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-importers-bridge-to-jira</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-importers-bridge-to-jira70</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

	<build>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
			</testResource>
			<testResource>
				<directory>src/test/xml</directory>
				<targetPath>xml</targetPath>
			</testResource>
		</testResources>
		<plugins>
			<plugin>
				<groupId>com.atlassian.maven.plugins</groupId>
				<artifactId>maven-jira-plugin</artifactId>
				<configuration>
                    <instructions>
                        <_consumer-policy>$(version;==;$(@))</_consumer-policy>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Spring-Context>*</Spring-Context>
                        <DynamicImport-Package>
                            com.pyxis.greenhopper.jira.license,
                            com.atlassian.greenhopper.api.rapid.view,
                            com.atlassian.greenhopper.api.rapid.configuration,
                            com.atlassian.greenhopper.customfield.epiclabel
                        </DynamicImport-Package>
                        <Export-Package>
                            com.atlassian.jira.plugins.importer.managers;x-friends:="com.atlassian.jira.plugins.jim-func-test-plugin",
                            com.atlassian.jira.plugins.importer.extensions,
                            com.atlassian.jira.plugins.importer.external.beans,
                            com.atlassian.jira.plugins.importer.external,
                            com.atlassian.jira.plugins.importer.imports,
                            com.atlassian.jira.plugins.importer.imports.config,
                            com.atlassian.jira.plugins.importer.imports.importer,
                            com.atlassian.jira.plugins.importer.tracking,
                            com.atlassian.jira.plugins.importer.web,
                            com.atlassian.jira.plugins.importer.sample
                        </Export-Package>
                        <Import-Package>
                            com.atlassian.jira.plugin.webfragment.conditions,
                            com.atlassian.sal.api.features;resolution:=optional,
                            com.atlassian.plugin.osgi.bridge.external,
                            com.atlassian.jira.util.xml,
                            org.w3c.dom,
                            com.atlassian.jira.config.database;resolution:=optional,
                            com.atlassian.jira.configurator.db;resolution:=optional,
                            com.atlassian.jira.configurator.config;resolution:=optional,
                            *;resolution:=optional
                        </Import-Package>
                    </instructions>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.12.4</version>
				<configuration>
					<includes>
						<include>com/**/*Test.java</include>
						<include>com/**/Test*.java</include>
					</includes>
					<forkMode>once</forkMode>
				</configuration>
			</plugin>
	        <plugin>
				<groupId>net.sf.alchim</groupId>
				<artifactId>yuicompressor-maven-plugin</artifactId>
                <version>0.7.1</version>
				<executions>
					<execution>
						<goals>
							<goal>compress</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<excludes>
						<exclude>*.xml</exclude>
						<exclude>**/*.js</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>com.atlassian.maven.plugins</groupId>
				<artifactId>sandbox-maven-plugin</artifactId>
				<version>2.0</version>
				<executions>
					<execution>
						<id>enable-sandbox</id>
						<phase>validate</phase>
						<goals>
							<goal>sandbox</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <forceCreation>true</forceCreation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <preparationGoals>clean test</preparationGoals>
                    <releaseProfiles>release</releaseProfiles>
                </configuration>
            </plugin>
		</plugins>
	</build>

	<properties>
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>

        <od.testing.configuration>
            use-maven,3
            use-java,8
            include-artifact,com.atlassian.jira.plugins:jira-importers-plugin-func-tests
        </od.testing.configuration>
	</properties>

</project>
