<?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>

    <parent>
        <groupId>com.github.davidmoten</groupId>
        <artifactId>odata-client-parent</artifactId>
        <version>0.1.2</version>
    </parent>
    <artifactId>odata-client-generator</artifactId>
    <name>${project.artifactId}</name>
    <description>OData client generator</description>

    <dependencies>
        <dependency>
            <groupId>com.github.davidmoten</groupId>
            <artifactId>odata-client-runtime</artifactId>
            <version>${project.parent.version}</version>
        </dependency>

        <!-- Test Dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.github.davidmoten</groupId>
            <artifactId>junit-extras</artifactId>
            <version>0.3</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.github.davidmoten</groupId>
            <artifactId>java-builder2</artifactId>
            <version>0.1.1</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>edm-xsd</id>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <packageName>org.oasisopen.odata.csdl.v4</packageName>
                            <schemaDirectory>src/xsd</schemaDirectory>
                            <clearOutputDir>false</clearOutputDir>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>package</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/generated-sources/jaxb</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
