<?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">
    <parent>
        <artifactId>molgenis</artifactId>
        <groupId>org.molgenis</groupId>
        <version>8.4.2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>molgenis-api</artifactId>

    <name>api</name>
    <description>API base module.</description>

    <build>
        <plugins>
            <plugin>
                <groupId>com.github.kongchen</groupId>
                <artifactId>swagger-maven-plugin</artifactId>
                <configuration>
                    <apiSources>
                        <apiSource>
                            <info>
                                <title>${project.name}</title>
                                <version>${project.version}</version>
                                <description>${project.description}</description>
                            </info>
                            <springmvc>true</springmvc>
                            <locations>
                                <location>org.molgenis.api</location>
                            </locations>
                            <swaggerDirectory>${project.build.directory}/generated-resources/swagger
                            </swaggerDirectory>
                            <swaggerFileName>${project.name}-swagger</swaggerFileName>
                        </apiSource>
                    </apiSources>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.helger.maven</groupId>
                <artifactId>ph-javacc-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>jjc1</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>javacc</goal>
                        </goals>
                        <configuration>
                            <jdkVersion>1.8</jdkVersion>
                            <sourceDirectory>src/main/resources</sourceDirectory>
                            <outputDirectory>${project.build.directory}/generated-sources/javacc</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.molgenis</groupId>
            <artifactId>molgenis-util</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- third party dependencies -->
        <dependency>
            <groupId>cz.jirutka.rsql</groupId>
            <artifactId>rsql-parser</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
        </dependency>
      <!-- test dependencies -->
      <dependency>
        <groupId>org.molgenis</groupId>
        <artifactId>molgenis-test</artifactId>
        <version>${project.version}</version>
        <scope>test</scope>
      </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.molgenis</groupId>
            <artifactId>molgenis-util</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>