<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <name>Providence Utils : Reflection</name>
    <description>
        Utilities for handling reflection of providence structures.

        This library can load .thrift files and handle data serialized by the
        structures defined in these files. Also contains providence definition
        of the .thrift IDL structure.
    </description>

    <parent>
        <groupId>net.morimekta.providence</groupId>
        <artifactId>providence</artifactId>
        <version>0.5.2</version>
    </parent>
    <artifactId>providence-reflect</artifactId>

    <dependencies>
        <dependency>
            <groupId>net.morimekta.providence</groupId>
            <artifactId>providence-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>net.morimekta.utils</groupId>
            <artifactId>io-util</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>findbugs-annotations</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>net.morimekta.utils</groupId>
            <artifactId>testing-util</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>create-providence-assembly</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/assembly/providence.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <!--
                          Adding the pre-generated model sources. It is done like this because
                          otherwise we would get a circular dependency like:
                          - reflection -> model -> maven-plugin -> reflection.
                        -->
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/main/model/</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
