<?xml version="1.0" encoding="UTF-8"?>
<!--
  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.
  -->
<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.apache.tomee</groupId>
        <artifactId>jax-rs</artifactId>
        <version>10.1.5</version>
    </parent>

    <artifactId>jax-rs-tests-embedded</artifactId>
    <packaging>jar</packaging>
    <name>TomEE :: TCK :: JAX-RS TCK :: Tests Embedded</name>


    <dependencies>
        <dependency>
            <groupId>jakarta.ws.rs</groupId>
            <artifactId>jakarta-restful-ws-tck</artifactId>
            <version>${jaxrs.tck.version}</version>
        </dependency>

        <!-- Added for test-->
        <dependency>
            <groupId>org.junit</groupId>
            <artifactId>junit-bom</artifactId>
            <version>${junit.jupiter.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>

        <!-- Needed by some TCK tests:
            JsonbContextProviderIT.shouldUseApplicationProvidedJsonbInstance
            UriBuilderIT.shouldBuildValidInstanceFromScratch
        -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>2.2</version>
            <scope>test</scope>
        </dependency>
        <!--Tomee-Deps:-->
        <!-- https://mvnrepository.com/artifact/org.apache.tomee/arquillian-tomee-remote -->
        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>arquillian-tomee-embedded</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>tomee-webservices</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>tomee-jaxrs</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>tck-jax-rs</id>
            <build>
                <testResources>
                    <testResource>
                        <directory>src/test/resources</directory>
                        <filtering>true</filtering>
                    </testResource>
                </testResources>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <reuseForks>false</reuseForks>
                            <forkCount>1</forkCount>
                            <useFile>false</useFile>
                            <disableXmlReport>false</disableXmlReport>

                            <!--Hint: Default naming of surefire is not followed.-->
                            <includes>
                                <include>**/*.java</include>
                            </includes>

                            <excludes>
                                <!--
                                SeBootstrap is stated as an optional component for containers.
                                It is also only listed as a Java-SE Publication Mechanism in the Specification (2.3.1.2).
                                Therefore, we exclude its IT.
                                -->
                                <exclude>**/SeBootstrapIT.java</exclude>
                                <!-- We have an own module for signature-Tests-->
                                <exclude>**/JAXRSSigTestIT.java</exclude>

                                <!-- TODO: TOMEE-4321 / CXF-9005
                                 ee.jakarta.tck.ws.rs.jaxrs31.spec.extensions.JAXRSClientIT#featureIsRegisteredTest
                                 ee.jakarta.tck.ws.rs.jaxrs31.spec.extensions.JAXRSClientIT#dynamicFeatureIsRegisteredTest
                                 -->
                                <exclude>**/JAXRSClientIT.java</exclude>
                                <!-- TODO: TOMEE-4436 -->
                                <exclude>**/spec/provider/standard/JAXRSClientIT.java</exclude>
                                <exclude>**/interceptor/clientwriter/interceptorcontext/JAXRSClientIT.java</exclude>
                                <exclude>**/interceptor/containerreader/interceptorcontext/JAXRSClientIT.java</exclude>
                                <exclude>**/interceptor/reader/interceptorcontext/JAXRSClientIT.java</exclude>
                                <exclude>**/interceptor/containerwriter/interceptorcontext/JAXRSClientIT.java</exclude>
                                <exclude>**/spec/client/invocations/JAXRSClientIT.java</exclude>
                            </excludes>

                            <dependenciesToScan>
                                <dependency>jakarta.ws.rs:jakarta-restful-ws-tck</dependency>
                            </dependenciesToScan>

                            <systemPropertyVariables>
                                <servlet_adaptor>org.apache.openejb.server.rest.OpenEJBRestServlet</servlet_adaptor>
                                <webServerHost>localhost</webServerHost>
                                <webServerPort>8080</webServerPort>
                                <porting.ts.url.class.1>ee.jakarta.tck.ws.rs.lib.implementation.sun.common.SunRIURL
                                </porting.ts.url.class.1>
                                <org.apache.cxf.transport.http.forceURLConnection>true
                                </org.apache.cxf.transport.http.forceURLConnection>
                                <openejb.jaxrs.fail-on-constrainedto>false</openejb.jaxrs.fail-on-constrainedto>
                                <tomee.embedded.tck.enable_tracing>true</tomee.embedded.tck.enable_tracing>
                                <user>j2ee</user>
                                <password>j2ee</password>
                                <authuser>javajoe</authuser>
                                <authpassword>javajoe</authpassword>
                                <openejb.jaxrs.skip.jakarta.json.providers.registration>false</openejb.jaxrs.skip.jakarta.json.providers.registration>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>