<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.github.sparow199</groupId>
        <artifactId>apollo-client-maven-plugin-parent</artifactId>
        <version>1.3.3</version>
        <relativePath>..</relativePath>
    </parent>

    <artifactId>apollo-client-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven-plugin-api.version>3.6.0</maven-plugin-api.version>
        <maven-project.version>2.2.1</maven-project.version>
        <apollo-compiler.version>1.0.2</apollo-compiler.version>
        <commons-io.version>2.6</commons-io.version>
        <reflections.version>0.9.11</reflections.version>
        <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
    </properties>

    <name>apollo-client-maven-plugin</name>
    <description>Maven plugin for generating graphql clients</description>
    <url>https://github.com/Sparow199/apollo-client-maven-plugin.git</url>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven-plugin-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${maven-plugin-api.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>${maven-project.version}</version>
        </dependency>

        <dependency>
            <groupId>com.apollographql.apollo</groupId>
            <artifactId>apollo-compiler</artifactId>
            <version>${apollo-compiler.version}</version>
        </dependency>
        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <version>${reflections.version}</version>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${project.build.directory}/node_modules</directory>
                <targetPath>node_modules</targetPath>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>${exec-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>npm</executable>
                    <workingDirectory>${project.build.directory}</workingDirectory>
                    <arguments>
                        <argument>install</argument>
                        <argument>apollo-codegen@0.19.1</argument>
                    </arguments>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>jcenter</id>
            <url>https://jcenter.bintray.com/</url>
        </repository>
    </repositories>
</project>