<?xml version="1.0" encoding="US-ASCII"?>
<!--
~ Copyright (c) 2015 OWASP.
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions
~ are met:
~
~     * Redistributions of source code must retain the above
~       copyright notice, this list of conditions and the following
~       disclaimer.
~
~     * Redistributions in binary form must reproduce the above
~       copyright notice, this list of conditions and the following
~       disclaimer in the documentation and/or other materials
~       provided with the distribution.
~
~     * Neither the name of the OWASP nor the names of its
~       contributors may be used to endorse or promote products
~       derived from this software without specific prior written
~       permission.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
~ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
~ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
~ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
~ COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
~ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
~ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
~ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
~ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
~ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
~ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
~ OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<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.owasp.encoder</groupId>
        <artifactId>encoder-parent</artifactId>
        <version>1.4.1</version>
    </parent>

    <artifactId>encoder-esapi</artifactId>
    <packaging>jar</packaging>

    <name>ESAPI Thunk</name>
    <description>
        The OWASP Encoders ESAPI Thunk provides an easy way to plugin the Encoder
        Projects API into an implementation of ESAPI.
    </description>

    <properties>
        <!-- Override with -Desapi.version to verify another supported ESAPI release. -->
        <esapi.version>2.7.0.0</esapi.version>
        <jigsaw.module.name>org.owasp.encoder.esapi</jigsaw.module.name>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.owasp.encoder</groupId>
            <artifactId>encoder</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>org.owasp.esapi</groupId>
            <artifactId>esapi</artifactId>
            <version>${esapi.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.6.3</version>
                <executions>
                    <execution>
                        <id>enforce-esapi-dependency-convergence</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <dependencyConvergence/>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile-module-path-test-support</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                        <configuration>
                            <compileSourceRoots>
                                <compileSourceRoot>${project.basedir}/../src/test-support/java</compileSourceRoot>
                            </compileSourceRoots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <adapter.bundle>${project.build.directory}/${project.build.finalName}.jar</adapter.bundle>
                        <encoder.bundle>${maven.multiModuleProjectDirectory}/core/target/encoder-${project.version}.jar</encoder.bundle>
                        <module.consumer.api.class>org.owasp.esapi.Encoder</module.consumer.api.class>
                        <module.consumer.classpath>true</module.consumer.classpath>
                        <module.consumer.main>owasp.encoder.esapi.consumer/org.owasp.encoder.consumer.EsapiConsumer</module.consumer.main>
                        <module.consumer.sources>${project.basedir}/src/test/modules/owasp.encoder.esapi.consumer</module.consumer.sources>
                    </systemPropertyVariables>
                </configuration>
                <executions>
                    <execution>
                        <id>module-path-consumer</id>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
