<?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>com.rackspace.papi.components</groupId>
        <artifactId>filters-support</artifactId>
        <version>6.1.1.0</version>
    </parent>

    <artifactId>rackspace-identity-basic-auth</artifactId>

    <name>Repose Components - Rackspace Identity Basic Auth</name>
    <description>
        This filter translates user requests from Basic Auth to the Rackspace Identity.
    </description>

    <packaging>jar</packaging>

    <properties>
        <sonar.jacoco.itReportPath>${project.basedir}/../../../target/jacoco-it.exec</sonar.jacoco.itReportPath>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
        </dependency>

        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_2.10</artifactId>
        </dependency>

        <!-- Mockrunner for mock HttpServletRequest -->
        <dependency>
            <groupId>com.mockrunner</groupId>
            <artifactId>mockrunner-servlet</artifactId>
            <version>1.0.0</version>
            <scope>test</scope>
        </dependency>

        <!-- These three are required because of our coupling between filters and core -->
        <dependency>
            <groupId>com.rackspace.papi.core</groupId>
            <artifactId>core-lib</artifactId>
        </dependency>

        <dependency>
            <groupId>com.rackspace.papi.commons</groupId>
            <artifactId>configuration</artifactId>
        </dependency>

        <dependency>
            <groupId>com.rackspace.papi.commons</groupId>
            <artifactId>utilities</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- The plugin that gets Scala running -->
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
            </plugin>

            <!-- The plugin that cleans up our XSD to conform to XML 1.0 -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>xml-maven-plugin</artifactId>
                <configuration>
                    <transformationSets>
                        <transformationSet>
                            <dir>src/main/resources/META-INF/config/schema</dir>
                            <stylesheet>../xsl/remove-1.1-elements.xsl</stylesheet>
                            <outputDir>${project.build.directory}/generated-resources/xml/xslt/config</outputDir>
                        </transformationSet>
                    </transformationSets>
                </configuration>
            </plugin>

            <!-- The plugin that compiles and binds our clean XSD to a Java object -->
            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <configuration>
                    <specVersion>2.2</specVersion>
                    <schemaDirectory>${project.build.directory}/generated-resources/xml/xslt</schemaDirectory>

                    <schemaIncludes>
                        <include>**/*.xsd</include>
                    </schemaIncludes>
                    <bindingIncludes>
                        <include>**/*.xjb</include>
                    </bindingIncludes>

                    <strict>true</strict>
                    <verbose>false</verbose>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
