<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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jaxrs-all</artifactId>
        <version>3.13.2.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>resteasy-jaxrs</artifactId>
    <name>RESTEasy JAX-RS Implementation</name>
    <description/>
    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>org.jboss.spec.javax.ws.rs</groupId>
            <artifactId>jboss-jaxrs-api_2.1_spec</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.spec.javax.xml.bind</groupId>
            <artifactId>jboss-jaxb-api_2.3_spec</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.spec.javax.servlet</groupId>
            <artifactId>jboss-servlet-api_4.0_spec</artifactId>
        </dependency>

        <dependency>
            <groupId>org.reactivestreams</groupId>
            <artifactId>reactive-streams</artifactId>
        </dependency>
        
        <dependency>
            <groupId>jakarta.validation</groupId>
            <artifactId>jakarta.validation-api</artifactId>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

        <dependency>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <!--
           Needed for javax.annotation.security.*
           should this dependency be <scope>provided</scope> and only used if
           detected runtime?
        -->
        <dependency>
            <groupId>org.jboss.spec.javax.annotation</groupId>
            <artifactId>jboss-annotations-api_1.3_spec</artifactId>
            <scope>compile</scope>
        </dependency>

        <!-- javax.activation.DataSource provider is required by spec -->
        <dependency>
            <groupId>com.sun.activation</groupId>
            <artifactId>jakarta.activation</artifactId>
        </dependency>

        <!-- 4.0 refactor of apache httpclient -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
	        <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>com.github.stephenc.jcip</groupId>
            <artifactId>jcip-annotations</artifactId>
        </dependency>

        <!-- Used by org.jboss.resteasy.plugins.server.tjws.* -->
        <!--
        <dependency>
            <groupId>tjws</groupId>
            <artifactId>webserver</artifactId>
            <scope>provided</scope>
        </dependency>
        -->

        <!-- Required by Hibernate Validator 5.x for testing -->
        <dependency>
            <groupId>org.jboss.spec.javax.el</groupId>
            <artifactId>jboss-el-api_3.0_spec</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>jakarta.el</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-processor</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.microprofile.config</groupId>
            <artifactId>microprofile-config-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.smallrye.config</groupId>
            <artifactId>smallrye-config</artifactId>
            <scope>provided</scope>
            <exclusions>
               <exclusion>
                  <groupId>javax.annotation</groupId>
                  <artifactId>javax.annotation-api</artifactId>
               </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>clover-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <!-- exclude integrations tests which are known to fail -->
            <id>exclude-known-tests-failures</id>
            <activation>
                <property>
                    <name>exclude-known-tests-failures</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <excludes combine.children="append">
                                <exclude>org/jboss/resteasy/test/providers/iioimage/TestIIOImageProvider.java</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>i18n</id>
            <activation>
                <property>
                    <name>i18n</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-resources</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${basedir}/src/main/resources/org/jboss/resteasy/resteasy_jaxrs/i18n</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>${basedir}/src/test/resources/i18n</directory>
                                            <includes>
                                                <include>*</include>
                                            </includes>
                                        </resource>
                                    </resources>
                                    <overwrite>true</overwrite>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-surefire-plugin</artifactId>
                       <executions>
                           <execution>
                               <id>i18</id>
                               <phase>test</phase>
                               <goals>
                                   <goal>test</goal>
                               </goals>
                               <configuration>
                                   <skip>false</skip>
                                   <reuseForks>false</reuseForks>
                                   <includes>
                                       <include>**/I18nTestMessages_*.java</include>
                                   </includes>
                               </configuration>
                           </execution>
                       </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
