<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">
    <!--

        Licensed to the Apache Software Foundation (ASF) under one or more
        contributor license agreements. See the NOTICE file distributed with
        this work for additional information regarding copyright ownership.
        The ASF licenses this file to You under the Apache License, Version
        2.0 (the "License"); you may not use this file except in compliance
        with the License. You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0 Unless required by
        applicable law or agreed to in writing, software distributed under the
        License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
        CONDITIONS OF ANY KIND, either express or implied. See the License for
        the specific language governing permissions and limitations under the
        License.
    -->

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.openwebbeans</groupId>
        <artifactId>openwebbeans</artifactId>
        <version>@project.version@</version>
    </parent>

    <groupId>org.apache.openwebbeans.it</groupId>
    <artifactId>openwebbeans-tomcat-it-fatwar</artifactId>
    <version>@project.version@</version>
    <packaging>war</packaging>
    <name>Tomcat plugin IT</name>

    <properties>
        <tomcat.port.it>9082</tomcat.port.it>
        <projectStage>Development</projectStage>
    </properties>


    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>jakarta.enterprise</groupId>
            <artifactId>jakarta.enterprise.cdi-api</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.inject</groupId>
            <artifactId>jakarta.inject-api</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.interceptor</groupId>
            <artifactId>jakarta.interceptor-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.openwebbeans</groupId>
            <artifactId>openwebbeans-impl</artifactId>
            <version>@project.version@</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.openwebbeans</groupId>
            <artifactId>openwebbeans-web</artifactId>
            <version>@project.version@</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.openwebbeans</groupId>
            <artifactId>openwebbeans-tomcat</artifactId>
            <version>@project.version@</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>jakarta.servlet.jsp.jstl</groupId>
            <artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
            <version>3.0.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>jakarta.servlet.jsp.jstl</artifactId>
            <version>2.0.0</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <finalName>owbTomcatIt</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.2.5</version>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>verify</id>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven3-plugin</artifactId>
                <configuration>
                    <container>
                        <containerId>tomcat10x</containerId>
                        <artifactInstaller>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat</artifactId>
                            <version>${tomcat.version}</version>
                        </artifactInstaller>
                    </container>
                    <deployables>
                        <deployable>
                            <type>war</type>
                            <location>${project.build.directory}/${project.build.finalName}.war</location>
                            <properties>
                                <context>/${project.build.finalName}</context>
                            </properties>
                        </deployable>
                    </deployables>
                    <configuration>
                        <properties>
                            <cargo.servlet.port>${tomcat.port.it}</cargo.servlet.port>
                        </properties>
                    </configuration>
                </configuration>
                <executions>
                    <execution>
                        <id>start-tomcat</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>start</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>stop-tomcat</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!--
                        <plugin>
                            <groupId>org.apache.tomcat.maven</groupId>
                            <artifactId>tomcat7-maven-plugin</artifactId>
                            <version>2.2</version>
                            <configuration>
                                <path>/${project.build.finalName}</path>
                                <addContextWarDependencies>true</addContextWarDependencies>
                                <port>${tomcat.port.it}</port>
                                <fork>true</fork> &lt;!&ndash; needed for testing ITs &ndash;&gt;
                                <systemProperties>
                                    <org.apache.myfaces.PROJECT_STAGE>${projectStage}</org.apache.myfaces.PROJECT_STAGE>
                                    <faces.PROJECT_STAGE>${projectStage}</faces.PROJECT_STAGE>
                                </systemProperties>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>start-tomcat</id>
                                    <phase>pre-integration-test</phase>
                                    <goals>
                                        <goal>run-war</goal>
                                    </goals>
                                </execution>
                                <execution>
                                    <id>stop-tomcat</id>
                                    <phase>post-integration-test</phase>
                                    <goals>
                                        <goal>shutdown</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
            -->
        </plugins>
    </build>


</project>
