<?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>5.3.0</version>
    </parent>

    <groupId>com.github.psi-probe</groupId>
    <artifactId>psi-probe-web</artifactId>
    <version>5.3.0</version>
    <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>
        <tag>psi-probe-5.3.0</tag>
        <url>https://github.com/psi-probe/psi-probe/</url>
    </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-tomcat10</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>psi-probe-tomcat11</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>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
    </dependencies>

    <build>
        <finalName>probe</finalName>
        <plugins>
            <plugin>
                <groupId>org.eclipse.jetty.ee10</groupId>
                <artifactId>jetty-ee10-jspc-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>jspc</goal>
                        </goals>
                    </execution>
                </executions>
            </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>
