<?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.41</version>
    </parent>
    <artifactId>odata-client-generator</artifactId>
    <name>${project.artifactId}</name>
    <packaging>bundle</packaging>
    <description>OData client generator</description>

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

        <dependency>
            <groupId>com.github.davidmoten</groupId>
            <artifactId>word-wrap</artifactId>
            <version>0.1.6</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.5.0</version>
                <executions>
                    <execution>
                        <id>edm-xsd</id>
                        <phase>generate-sources</phase>
                        <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>com.google.code.maven-replacer-plugin</groupId> -->
            <!-- <artifactId>replacer</artifactId> -->
            <!-- <version>1.5.3</version> -->
            <!-- <executions> -->
            <!-- <execution> -->
            <!-- <phase>generate-sources</phase> -->
            <!-- <goals> -->
            <!-- <goal>replace</goal> -->
            <!-- </goals> -->
            <!-- </execution> -->
            <!-- </executions> -->
            <!-- <configuration> -->
            <!-- <filesToInclude> -->
            <!-- ${project.build.directory}/generated-sources/jaxb/org/oasisopen/odata/csdl/v4/TAction.java,${project.build.directory}/generated-sources/jaxb/org/oasisopen/odata/csdl/v4/TFunction.java -->
            <!-- </filesToInclude> -->
            <!-- <replacements> -->
            <!-- <replacement> -->
            <!-- <token>(public class T.*ction)</token> -->
            <!-- <value>$1 implements com.github.davidmoten.odata.csdl.v4.extras.ActionOrFunction</value> -->
            <!-- </replacement> -->
            <!-- </replacements> -->
            <!-- </configuration> -->
            <!-- </plugin> -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${build.helper.version}</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>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse 
                    m2e settings only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            com.google.code.maven-replacer-plugin
                                        </groupId>
                                        <artifactId>
                                            replacer
                                        </artifactId>
                                        <versionRange>
                                            [1.5.3,)
                                        </versionRange>
                                        <goals>
                                            <goal>replace</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
