<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
    Copyright 2013 Red Hat, Inc. and/or its affiliates.

    This file is part of lightblue.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses />.
-->
<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.redhat.lightblue.rest</groupId>
        <artifactId>lightblue-rest-pom</artifactId>
        <version>2.32.0</version>
    </parent>
    <artifactId>lightblue-rest-metadata</artifactId>
    <packaging>war</packaging>
    <name>lightblue-rest: ${project.groupId}|${project.artifactId}</name>
    <dependencies>
        <dependency>
            <groupId>com.codeablereason.restcompress.provider</groupId>
            <artifactId>rest-compress-lib</artifactId>
        </dependency>
        <dependency>
            <groupId>com.redhat.lightblue.rest</groupId>
            <artifactId>lightblue-rest-common</artifactId>
        </dependency>
        <dependency>
            <groupId>com.redhat.lightblue</groupId>
            <artifactId>lightblue-core-config</artifactId>
        </dependency>
        <dependency>
            <groupId>com.redhat.lightblue</groupId>
            <artifactId>lightblue-core-util</artifactId>
        </dependency>
        <dependency>
            <groupId>com.redhat.lightblue.mongo</groupId>
            <artifactId>lightblue-mongo</artifactId>
        </dependency>
        <dependency>
            <groupId>com.redhat.lightblue.mongo</groupId>
            <artifactId>lightblue-mongo-test</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-jetty-embedded-7</artifactId>
            <version>1.0.0.CR3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-webapp</artifactId>
            <version>7.1.1.v20100517</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-plus</artifactId>
            <version>7.1.1.v20100517</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.weld.servlet</groupId>
            <artifactId>weld-servlet</artifactId>
            <version>1.1.34.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.logmanager</groupId>
            <artifactId>jboss-logmanager</artifactId>
            <version>1.5.7.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jackson-provider</artifactId>
            <version>3.15.3.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
        
        
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.redhat.lightblue.rest</groupId>
            <artifactId>lightblue-rest-test</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <forkCount>1</forkCount>
                    <reuseForks>false</reuseForks>
                    <skipTests>true</skipTests> <!-- jdk7 will fail if tests are executed because upstream deps are jdk8 only -->
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <attachClasses>true</attachClasses>
                    <webResources>
                        <resource>
                            <directory>src/main/webapp</directory>
                            <filtering>true</filtering>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>rpm</id>
            <build>
                <plugins>
                    <!-- RPM packing -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>rpm-maven-plugin</artifactId>
                        <version>2.1-alpha-3</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>rpm</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                        <configuration>
                            <name>${project.artifactId}</name>
                            <copyright>Red Hat</copyright>
                            <distribution>RHEL</distribution>
                            <group>Lightblue Platform</group>
                            <packager>${user.name}</packager>
                            <defaultFilemode>744</defaultFilemode>
                            <defaultUsername>jboss</defaultUsername>
                            <defaultGroupname>jboss</defaultGroupname>
                            <mappings>
                                <mapping>
                                    <directory>${rpm.install.basedir}</directory>
                                    <directoryIncluded>false</directoryIncluded>
                                    <sources>
                                        <source>
                                            <location>target/${project.artifactId}-${project.version}.${project.packaging}</location>
                                        </source>
                                    </sources>
                                </mapping>
                            </mappings>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>2.6</version>
                        <configuration>
                            <attachClasses>true</attachClasses>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
