<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.crowd</groupId>
        <artifactId>atlassian-crowd-components</artifactId>
        <version>4.3.4</version>
    </parent>

    <artifactId>crowd-integration-api</artifactId>

    <name>Atlassian Crowd Integration API</name>

    <dependencies>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>embedded-crowd-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.collectors</groupId>
            <artifactId>atlassian-collectors-util</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</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>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-junit</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <configuration>
                            <tasks>
                                <tstamp>
                                    <format property="TODAY_LONG" pattern="yyyy-MM-dd" locale="en" />
                                </tstamp>
                                <filterset id="filters">
                                    <filter token="DATE_FORMAT" value="yyyy-MM-dd" />
                                    <filter token="BUILD_DATE" value="${TODAY_LONG}" />
                                    <filter token="BUILD_NUMBER" value="${buildNumber}" />
                                    <filter token="VERSION" value="${project.version}" />
                                </filterset>
                                <copy preservelastmodified="true" file="src/main/resources/com/atlassian/crowd/util/build/BuildUtils.template" tofile="${project.build.directory}/generated-sources/java/com/atlassian/crowd/util/build/BuildUtils.java" overwrite="true">
                                    <filterset refid="filters" />
                                </copy>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>1.7</version>
            <executions>
                <execution>
                    <id>add-source</id>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>add-source</goal>
                    </goals>
                    <configuration>
                        <sources>
                            <source>${project.build.directory}/generated-sources/java</source>
                        </sources>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>clirr-maven-plugin</artifactId>
            <executions>
                <execution>
                    <id>clirr-check</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <ignored>
                    <!-- Method Added to Interface -->
                    <difference>
                        <className>**/*</className>
                        <method>*</method>
                        <differenceType>7012</differenceType>
                    </difference>
                    <!-- Ignore BuildUtils constant changes -->
                    <difference>
                        <className>com/atlassian/crowd/util/build/BuildUtils</className>
                        <field>BUILD_DATE</field>
                        <differenceType>6003</differenceType>
                    </difference>
                    <difference>
                        <className>com/atlassian/crowd/util/build/BuildUtils</className>
                        <field>BUILD_NUMBER</field>
                        <differenceType>6003</differenceType>
                    </difference>
                    <difference>
                        <className>com/atlassian/crowd/util/build/BuildUtils</className>
                        <field>BUILD_VERSION</field>
                        <differenceType>6003</differenceType>
                    </difference>
                    <!-- Removed in 3.2, due to AuditService.search() removal -->
                    <difference>
                        <className>com/atlassian/crowd/search/query/entity/restriction/constants/AuditLogTermKeys</className>
                        <differenceType>8001</differenceType>
                    </difference>
                </ignored>
            </configuration>
        </plugin>
      </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>clirr-maven-plugin</artifactId>
                <configuration>
                    <ignored>
                        <!-- Don't add more things here, otherwise they won't be included in the report -->
                        <difference>
                            <className>**/*</className>
                            <method>*</method>
                            <differenceType>7012</differenceType> <!-- Method Added to Interface -->
                        </difference>
                    </ignored>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

</project>
