<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.pom</groupId>
        <artifactId>public-pom</artifactId>
        <version>5.0.23</version>
    </parent>

    <groupId>com.atlassian.bonnie</groupId>
    <artifactId>atlassian-bonnie</artifactId>
    <version>8.2.1</version>

    <name>Atlassian Bonnie</name>
    <description>Bonnie contains Lucene indexing and utility classes.</description>
    <inceptionYear>2006</inceptionYear>
    <url>http://docs.atlassian.com/${project.artifactId}/${project.version}</url>

    <issueManagement>
        <system>Jira</system>
        <url>http://jira.atlassian.com/browse/BONNIE</url>
    </issueManagement>

    <scm>
        <connection>scm:git:ssh://git@bitbucket.org/atlassian/atlassian-bonnie.git</connection>
        <developerConnection>scm:git:ssh://git@bitbucket.org/atlassian/atlassian-bonnie.git</developerConnection>
        <url>https://bitbucket.org/atlassian/atlassian-bonnie</url>
      <tag>atlassian-bonnie-8.2.1</tag>
  </scm>

    <properties>
        <!-- The bundled version in Confluence is set here https://stash.atlassian.com/projects/CONFSERVER/repos/confluence/browse/pom.xml -->
        <lucene.version>4.4.0-atlassian-4</lucene.version>
        <jacoco.report.file>src/test/target/site/jacoco-aggregate/jacoco.xml</jacoco.report.file>
    </properties>

    <build>
        <sourceDirectory>src/java</sourceDirectory>
        <testSourceDirectory>src/test</testSourceDirectory>
        <testResources>
            <testResource>
                <directory>src/etc/test</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.5</version>
            </plugin>
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>3.7.0.1746</version>
            </plugin>
        </plugins>
    </build>

<profiles>
    <profile>
        <id>jacoco</id>
        <properties>
            <jacoco.include.pattern>com/atlassian/bonnie/**</jacoco.include.pattern>

            <!--suppress UnresolvedMavenProperty -->
            <sonar.login>${bamboo.sonar.enterprise.confsrv.token.password}</sonar.login>
            <!--suppress UnresolvedMavenProperty -->
            <sonar.branch.name>${bamboo.planRepository.branchName}</sonar.branch.name>
            <sonar.host.url>https://sonar-enterprise.internal.atlassian.com</sonar.host.url>
            <sonar.projectName>Atlassian Bonnie</sonar.projectName>
            <sonar.projectKey>atlassian-bonnie</sonar.projectKey>
            <sonar.moduleKey>${project.artifactId}</sonar.moduleKey>
            <sonar.scm.provider>git</sonar.scm.provider>
        </properties>
        <build>
            <plugins>
                <!-- Code coverage -->
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>agent-for-ut</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                            <configuration>
                                <propertyName>jacoco.agent.argLine</propertyName>
                                <includes>
                                    <include>${jacoco.include.pattern}</include>
                                </includes>
                            </configuration>
                        </execution>
                        <execution>
                            <id>agent-for-it</id>
                            <phase>initialize</phase>
                            <goals>
                                <goal>prepare-agent-integration</goal>
                            </goals>
                            <configuration>
                                <propertyName>jacoco.agent.it.argLine</propertyName>
                                <includes>
                                    <include>${jacoco.include.pattern}</include>
                                </includes>
                            </configuration>
                        </execution>
                        <execution>
                            <id>report-aggregate</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>report-aggregate</goal>
                            </goals>
                            <configuration>
                                <includes>
                                    <include>${jacoco.include.pattern}</include>
                                </includes>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <argLine>@{jacoco.agent.argLine}</argLine>
                        <!-- Ignoring integration tests on test phase so they just run in integration-test phase.-->
                        <!-- This configuration is necessary when using AMPS together with a parent POM.-->
                        <excludes>
                            <exclude>it/**</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <configuration>
                        <argLine>@{jacoco.agent.it.argLine}</argLine>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>run-sonar</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sonar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

    <dependencies>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>${lucene.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-analyzers-common</artifactId>
            <version>${lucene.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-queryparser</artifactId>
            <version>${lucene.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bonnie</groupId>
            <artifactId>lucene-upgrader</artifactId>
            <version>1.0</version>
            <classifier>lucene36</classifier>
        </dependency>
        <dependency>
            <groupId>io.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</artifactId>
            <version>4.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.profiling</groupId>
            <artifactId>atlassian-profiling</artifactId>
            <version>3.4.3</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.core</groupId>
            <artifactId>atlassian-core</artifactId>
            <version>4.2</version>
            <exclusions>
                <exclusion>
                    <groupId>velocity</groupId>
                    <artifactId>velocity</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-collections</groupId>
                    <artifactId>commons-collections</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>osuser</groupId>
                    <artifactId>osuser</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>opensymphony</groupId>
                    <artifactId>propertyset</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>opensymphony</groupId>
                    <artifactId>sitemesh</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>mockobjects</groupId>
                    <artifactId>alt-jdk1.3</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>oscache</groupId>
                    <artifactId>oscache</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.4.3</version>
        </dependency>
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.4-full</version>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.4</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.8.0</version>
        </dependency>

        <!-- extraction dependencies -->
        <!--<dependency>-->
            <!--<groupId>tm-extractors</groupId>-->
            <!--<artifactId>tm-extractors</artifactId>-->
            <!--<version>0.4</version>-->
        <!--</dependency>-->

        <!-- test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.4.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.8</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>mockobjects</groupId>
            <artifactId>mockobjects-core</artifactId>
            <version>0.09</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
            <version>1.9.5</version>
        </dependency>
    </dependencies>
</project>
