<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed under the GPL License. You may not use this file except in compliance with the License.
    You may obtain a copy of the License at

      https://www.gnu.org/licenses/old-licenses/gpl-2.0.html

    THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
    WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
    PURPOSE.

-->
<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.github.psi-probe</groupId>
        <artifactId>psi-probe</artifactId>
        <version>3.5.8</version>
    </parent>

    <artifactId>psi-probe-web</artifactId>
    <packaging>war</packaging>

    <name>psi-probe-web</name>
    <description>
        PSI Probe Web Application - Web view, message resources, and configuration
    </description>
    <url>https://github.com/psi-probe/psi-probe/</url>

    <scm>
        <connection>scm:git:ssh://git@github.com/psi-probe/psi-probe.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/psi-probe/psi-probe.git</developerConnection>
        <url>https://github.com/psi-probe/psi-probe/</url>
        <tag>psi-probe-3.5.8</tag>
    </scm>

    <properties>
        <probe.log.path>${catalina.base}/logs</probe.log.path>
    </properties>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>psi-probe-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>psi-probe-ojdbc</artifactId>
            <version>${probe-ojdbc.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>psi-probe-tomcat7</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>psi-probe-tomcat85</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>psi-probe-tomcat9</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet.jsp</groupId>
            <artifactId>jakarta.servlet.jsp-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet.jsp.jstl</groupId>
            <artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>jakarta.servlet.jsp.jstl</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.el</groupId>
            <artifactId>jakarta.el-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.hazendaz</groupId>
            <artifactId>displaytag</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.glassfish.web</groupId>
                    <artifactId>javax.servlet.jsp.jstl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.servlet.jsp.jstl</groupId>
                    <artifactId>javax.servlet.jsp.jstl-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>jcl-over-slf4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
    </dependencies>

    <build>
        <finalName>probe</finalName>
        <plugins>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-jspc-maven-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>psi-probe-core</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <resource>
                            <directory>${project.basedir}/src/main/resources</directory>
                            <includes>
                                <include>logback.xml</include>
                            </includes>
                            <targetPath>WEB-INF/classes</targetPath>
                            <filtering>true</filtering>
                        </resource>
                        <resource>
                            <directory>${project.basedir}/src/main/webapp</directory>
                            <includes>
                                <include>**/*messages*.properties</include>
                                <include>**/*web.xml</include>
                            </includes>
                            <filtering>true</filtering>
                        </resource>
                        <resource>
                            <!-- Required for JBoss. See https://developer.jboss.org/wiki/Web-AppContextConfiguration -->
                            <directory>${project.basedir}/src/main/webapp/META-INF</directory>
                            <includes>
                                <include>context.xml</include>
                            </includes>
                            <targetPath>WEB-INF</targetPath>
                            <filtering>false</filtering>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>jboss</id>
            <properties>
                <probe.log.path>${jboss.server.log.dir}</probe.log.path>
            </properties>
        </profile>
    </profiles>
</project>
