<?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>
        <artifactId>restheart-parent</artifactId>
        <groupId>org.restheart</groupId>
        <version>9.4.2</version>
    </parent>

    <groupId>org.restheart</groupId>
    <artifactId>restheart-graphql</artifactId>
    <packaging>jar</packaging>

    <name>restheart-graphql</name>
    <description>RESTHeart MongoDB - GraphQL plugin</description>
    <url>http://www.restheart.org</url>
    <inceptionYear>2020</inceptionYear>

    <licenses>
        <license>
            <name>GNU Affero General Public License (AGPL) version 3.0</name>
            <url>http://www.gnu.org/licenses/agpl-3.0.html</url>
            <distribution>repo</distribution>
            <comments>Core components license</comments>
        </license>
    </licenses>

    <dependencies>
        <dependency>
            <groupId>org.restheart</groupId>
            <artifactId>restheart-commons</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.restheart</groupId>
            <artifactId>restheart-mongodb</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.graphql-java</groupId>
            <artifactId>graphql-java</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                    <id>copy-dependencies</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>copy-dependencies</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${project.build.directory}/lib</outputDirectory>
                        <includeScope>runtime</includeScope>
                    </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <verbose>true</verbose>
                    <includes>
                        <includes>**/*.java</includes>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-license-headers</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <licenseName>agpl_v3</licenseName>
                            <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                            <emptyLineAfterHeader>true</emptyLineAfterHeader>
                            <skipUpdateLicense>${skipUpdateLicense}</skipUpdateLicense>
                            <processStartTag>========================LICENSE_START=================================
                            </processStartTag>
                            <processEndTag>=========================LICENSE_END==================================
                            </processEndTag>
                            <roots>
                                <root>src/main/java</root>
                                <root>src/test</root>
                            </roots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>