<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2012-2014 Codenvy, S.A.
    All rights reserved. This program and the accompanying materials
    are made available under the terms of the Eclipse Public License v1.0
    which accompanies this distribution, and is available at
    http://www.eclipse.org/legal/epl-v10.html

    Contributors:
      Codenvy, S.A. - initial API and implementation

-->
<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>
        <artifactId>everrest-parent</artifactId>
        <groupId>org.everrest</groupId>
        <version>1.4.0</version>
    </parent>
    <artifactId>everrest-core</artifactId>
    <name>EverRest :: Core</name>
    <dependencies>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>jsr250-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>javax.ws.rs-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <!-- Groovy Beans <-> JSON -->
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.everrest</groupId>
            <artifactId>everrest-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-test-source</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/generated-test-sources</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <version>0.9.0</version>
                <executions>
                    <execution>
                        <id>generate wadl classes</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <schemaDirectory>src/main/resources</schemaDirectory>
                            <catalog>src/main/resources/catalog.xml</catalog>
                            <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
                            <generatePackage>org.everrest.core.wadl.research</generatePackage>
                            <args>
                                <arg>-extension</arg>
                            </args>
                            <schemaIncludes>
                                <include>wadl.xsd</include>
                            </schemaIncludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>generate classes for test</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <schemaDirectory>src/test/resources</schemaDirectory>
                            <catalog>src/main/resources/catalog.xml</catalog>
                            <generateDirectory>${project.build.directory}/generated-test-sources</generateDirectory>
                            <generatePackage>org.everrest.core.generated</generatePackage>
                            <args>
                                <arg>-extension</arg>
                            </args>
                            <schemaIncludes>
                                <include>book.xsd</include>
                            </schemaIncludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/*.xsd</exclude>
                        <exclude>**/*.dtd</exclude>
                        <exclude>**/*.json</exclude>
                        <exclude>**/META-INF/services/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
