<?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>org.raml.jaxrs</groupId>
        <artifactId>maven-examples</artifactId>
        <version>3.0.5</version>
    </parent>

    <artifactId>references</artifactId>
    <!-- Repeating here for documentation -->
    <properties>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>javax.ws.rs-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.raml.jaxrs</groupId>
            <artifactId>jaxrs-code-generator</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.containers</groupId>
            <artifactId>jersey-container-jetty-http</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-json-jackson</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.jaxrs</groupId>
            <artifactId>jackson-jaxrs-json-provider</artifactId>
        </dependency>
        <dependency>
            <groupId>org.raml.plugins</groupId>
            <artifactId>raml-jaxrs-maven-plugin</artifactId>
            <version>1.3.4</version>
            <scope>test</scope>
        </dependency>
   </dependencies>
    <build>
        <plugins>

<!--
            <plugin>
                <groupId>org.raml.plugins</groupId>
                <artifactId>raml-jaxrs-maven-plugin</artifactId>
                <version>1.3.4</version>
                <configuration>
                    <sourceDirectory>${project.build.resources[0].directory}</sourceDirectory>
                    <basePackageName>com.acme.api</basePackageName>
                    <useSourceHierarchyInPackageName>true</useSourceHierarchyInPackageName>
                    <jaxrsVersion>2.0</jaxrsVersion>
                    <useJsr303Annotations>false</useJsr303Annotations>
                    <jsonMapper>jackson2</jsonMapper>
                    <removeOldOutput>true</removeOldOutput>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <phase>generate-sources</phase>
                    </execution>
                </executions>
            </plugin>
-->

            <plugin>
                <groupId>org.raml.jaxrs</groupId>
                <artifactId>raml-to-jaxrs-maven-plugin</artifactId>
                <version>${project.version}</version>
                <configuration>
                    <ramlFile>${project.build.resources[0].directory}/api.raml</ramlFile>
                    <resourcePackage>example.references</resourcePackage>
                    <copySchemas>true</copySchemas>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <configuration>
                    <mainClass>server.raml08.StartServer</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>java</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
