<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>providers-pom</artifactId>
        <version>6.2.12.Final</version>
	    <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>resteasy-jaxb-provider</artifactId>
    <packaging>jar</packaging>
    <name>RESTEasy JAXB Provider</name>
    <description/>

    <dependencies>

        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-core-spi</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- jakarta.xml.bind.JAXBElement provider is required by spec -->
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
        </dependency>
        <!-- JAXB Implementation -->
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>codemodel</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-jxc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>txw2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-xjc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>xsom</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.istack</groupId>
            <artifactId>istack-commons-runtime</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.istack</groupId>
            <artifactId>istack-commons-tools</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind.external</groupId>
            <artifactId>relaxng-datatype</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind.external</groupId>
            <artifactId>rngom</artifactId>
        </dependency>
        <!-- End JAXB Implementation -->
       <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-annotations</artifactId>
            <!-- This is a compile time only requirement -->
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <profiles>
        <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/plugins/providers/jaxb/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>
