<?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.stash</groupId>
        <artifactId>stash-plugins-parent</artifactId>
        <version>3.11.0-m7</version>
    </parent>

    <artifactId>stash-scm-git-api</artifactId>
    <packaging>bundle</packaging>
    <name>Atlassian Stash Git SCM API</name>
    <description>Provides a reusable API for leveraging built-in Git functionality</description>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>clirr-rules-maven-plugin</artifactId>
                <configuration>
                    <comparisonVersion>${stash.previous.minor.version}</comparisonVersion>
                    <includes>
                        <include>com/atlassian/stash/scm/git/**</include>
                    </includes>
                    <excludeRules>
                        <exclude>METHOD_ADDED_TO_INTERFACE</exclude>
                    </excludeRules>
                    <resolveDependentClasses>true</resolveDependentClasses>
                    <expectedFile>${basedir}/src/test/etc/scm-git-api-changes.txt</expectedFile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>com.atlassian.stash.scm.git</Bundle-SymbolicName>
                        <Export-Package>com.atlassian.stash.scm.git*</Export-Package>
                        <Import-Package>
                            com.atlassian.event.api,
                            com.atlassian.stash*,
                            com.google.common.base,
                            com.google.common.collect,
                            javax.annotation,
                            org.apache.commons.lang;version="${commons.lang.libversion}",
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-spi</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-dependency-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <skip>false</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <properties>
                <release.javadoc.additional.params>${release.javadoc.common.plugin.params}</release.javadoc.additional.params>
            </properties>
        </profile>
        <profile>
            <!--
                Instrumented classes include clover references.
                When running clover, don't stress about bundle definitions
            -->
            <id>clover</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>maven-bundle-plugin</artifactId>
                        <configuration>
                            <instructions>
                                <Import-Package>
                                    *;resolution:=optional,
                                </Import-Package>
                            </instructions>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
