<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         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</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>26</version>
        <relativePath/>
    </parent>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-spring-boot-starter</artifactId>
    <version>2.0.1.Final</version>
    <name>${project.artifactId}</name>

    <description>A Spring Boot starter for RESTEasy</description>
    <url>https://github.com/resteasy/resteasy-spring-boot</url>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Fabio Carvalho</name>
            <email>facarvalho@paypal.com</email>
            <organization>PayPal</organization>
            <organizationUrl>http://www.paypal.com</organizationUrl>
        </developer>
        <developer>
            <name>Alessio Soldano</name>
            <email>alessio.soldano@jboss.com</email>
            <organization>Red Hat</organization>
            <organizationUrl>http://www.redhat.com</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git@github.com:resteasy/resteasy-spring-boot.git</connection>
        <developerConnection>scm:git:git@github.com:resteasy/resteasy-spring-boot.git</developerConnection>
        <url>git@github.com:resteasy/resteasy-spring-boot.git</url>
    </scm>
    <distributionManagement>
        <repository>
            <id>jboss-releases-repository</id>
            <name>JBoss Releases Repository</name>
            <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <issueManagement>
        <system>JIRA</system>
        <url>http://jira.jboss.com/jira/browse/RESTEASY</url>
    </issueManagement>

    <properties>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <springboot.version>2.0.4.RELEASE</springboot.version>
        <resteasy.version>3.6.1.Final</resteasy.version>
        <coverage.line>80</coverage.line>
        <coverage.branch>80</coverage.branch>
        <modular.jdk.args/>
        <modular.jdk.props/>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <version>${springboot.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${springboot.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
            <version>${resteasy.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-servlet-initializer</artifactId>
            <version>${resteasy.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-spring</artifactId>
            <version>${resteasy.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.jboss.resteasy</groupId>
                    <artifactId>resteasy-jettison-provider</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jackson2-provider</artifactId>
            <version>${resteasy.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>2.0.1.Final</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.json</artifactId>
            <version>1.1.2</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse</groupId>
            <artifactId>yasson</artifactId>
            <version>1.0.1</version>
            <scope>runtime</scope>
        </dependency>
    
        <!-- Test dependencies -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>${springboot.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
            <version>${springboot.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <artifactId>HikariCP</artifactId>
                    <groupId>com.zaxxer</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.14.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>2.18.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-core</artifactId>
            <version>2.0.0-beta.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito2</artifactId>
            <version>2.0.0-beta.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-testng-common</artifactId>
            <version>2.0.0-beta.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-testng</artifactId>
            <version>2.0.0-beta.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-reflect</artifactId>
            <version>2.0.0-beta.5</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
	    <profile>
	      <id>JDK9</id>
	      <activation>
	        <jdk>[9,)</jdk>
	      </activation>
	      <properties>
	        <modular.jdk.args>
	          --add-modules=java.se
	        </modular.jdk.args>
	        <modular.jdk.props>
	          --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED
	        </modular.jdk.props>
	        <!--modular.jdk.props>-Dsun.util.logging.disableCallerCheck=true -Dsun.reflect.debugModuleAccessChecks=true -Djaxb.debug=true</modular.jdk.props-->
	      </properties>
	    </profile>
    
        <!-- Added for Fortify Support -->
        <profile>
            <id>fortify</id>
            <activation></activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.fortify.ps.maven.plugin</groupId>
                        <artifactId>sca-maven-plugin</artifactId>
                        <version>4.22</version>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ossrh</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphrase>${gpg.passphrase}</passphrase>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>cobertura</id>
            <activation>
                <jdk>[,1.9)</jdk>
            </activation>
            <build>
                <plugins>
                <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <configuration>
                    <check>
                        <lineRate>${coverage.line}</lineRate>
                        <packageLineRate>${coverage.line}</packageLineRate>
                        <totalLineRate>${coverage.line}</totalLineRate>
                        <branchRate>${coverage.branch}</branchRate>
                        <packageBranchRate>${coverage.branch}</packageBranchRate>
                        <totalBranchRate>${coverage.branch}</totalBranchRate>
                        <haltOnFailure>true</haltOnFailure>
                        <regexes>
                            <regex>
                                <pattern>org.jboss.resteasy.springboot.JaxrsApplicationScanner</pattern>
                                <lineRate>80</lineRate>
                                <branchRate>65</branchRate>
                            </regex>
                        </regexes>
                    </check>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>clean</goal>
                            <goal>cobertura</goal>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Added for Fortify Support -->
                <plugin>
                    <groupId>com.fortify.ps.maven.plugin</groupId>
                    <artifactId>sca-maven-plugin</artifactId>
                    <configuration>
                        <source>1.8</source>
                        <maxHeap>1G</maxHeap>
                    </configuration>
                    <executions>
                        <execution>
                            <id>sca-clean</id>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>sca-translate-exec</id>
                            <goals>
                                <goal>translate</goal>
                            </goals>
                        </execution>
                    </executions>
                    <version>4.22</version>
                </plugin>
                <!-- End Added For Fortify Support -->
            </plugins>
        </pluginManagement>
        <plugins>
        
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>${modular.jdk.args} ${modular.jdk.props}</argLine>
                </configuration>
            </plugin>
        
        </plugins>
   </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
            </plugin>
        </plugins>
    </reporting>

</project>
