<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>2.2.4</version>
    </parent>

    <groupId>com.atlassian.crowd</groupId>
    <artifactId>crowd-integration-api</artifactId>

    <packaging>jar</packaging>
    <name>Atlassian Crowd Integration API</name>

    <dependencies>

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

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <scope>compile</scope>
        </dependency>
        
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>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="dd-MM-yyyy" locale="en" />
                                </tstamp>
                                <filterset id="filters">
                                    <filter token="DATE_FORMAT" value="dd-MM-yyyy" />
                                    <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.5</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>

      </plugins>
    </build>

</project>
