<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>
    <groupId>com.h3xstream.findsecbugs</groupId>
    <artifactId>findsecbugs-root-pom</artifactId>

    <packaging>pom</packaging>
    <version>1.12.0</version>

    <name>OWASP Find Security Bugs root</name>

    <description>Root project file that aggregate the different modules of Find Security Bugs.</description>

    <properties>
        <!-- Encoding configuration -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <build>
        <plugins>
            <!-- Force the use the compatibility to Java 8 -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <!-- Be careful before updating this plugin..
                    The current deployment process will fail.
                    (https://github.com/find-sec-bugs/find-sec-bugs/wiki/Compiling#release-process) -->
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <!-- Update automatically the header of the source code to the LGPL header. -->
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.11</version>
                <configuration>
                    <header>file:///${session.executionRootDirectory}/LGPL-3.0-header.txt</header>
                    <aggregate>true</aggregate>
                    <strictCheck>true</strictCheck>
                    <includes>
                        <include>**/**.java</include>
                    </includes>
                    <excludes>
                        <exclude>**/SMAPSourceDebugExtension.java</exclude>
                        <exclude>**/testcode/**/**.java</exclude>
                        <exclude>**/testcasesupport/**/**.java</exclude>
                        <exclude>**/testcases/**/**.java</exclude>
                        <exclude>**/package-info.java</exclude>
                        <!-- Package that contains stub api -->
                        <exclude>**/java/android/**/**.java</exclude>
                        <exclude>**/com/hazelcast/**/**.java</exclude>
                        <exclude>**/javax/**/**.java</exclude>
                        <exclude>**/org/opensaml/xml/**/**.java</exclude>
                        <exclude>**/org/acegisecurity/**/**.java</exclude>
                        <exclude>**/org/apache/**/**.java</exclude>
                        <exclude>**/org/bouncycastle/**/**.java</exclude>
                        <exclude>**/org/hibernate/**/**.java</exclude>
                        <exclude>**/org/eclipse/jetty/**/**.java</exclude>
                        <exclude>**/org/slf4j/**/**.java</exclude>
                        <exclude>**/org/sonarqube/**/**.java</exclude>
                        <exclude>**/org/owasp/**/**.java</exclude>
                        <exclude>**/io/dropwizard/**/**.java</exclude>
                        <exclude>**/org/jboss/**/**.java</exclude>
                        <exclude>**/org/springframework/**/**.java</exclude>
                        <exclude>**/com/unboundid/ldap/**/**.java</exclude>
                        <exclude>**/java/scala/util/**/**.java</exclude>
                        <exclude>**/groovy/lang/**.java</exclude>
                        <exclude>**/scala/**.java</exclude>
                        <exclude>**/scala/**/**.java</exclude>
                        <exclude>**/**/ReadMe.java</exclude>
                        <exclude>**/freemarker/template/**/**.java</exclude>
                        <exclude>**/pebble/**/**/**.java</exclude>
                        <exclude>**/PluginDepsClassPathFinder.java</exclude>
                        <exclude>**/java/flexjson/**.java</exclude>
                        <exclude>**/java/com/typesafe/**/**.java</exclude>
                        <exclude>**/java/com/fasterxml/jackson/**/**.java</exclude>
                        <exclude>**/java/ognl/**/**.java</exclude>
                        <exclude>**/com/sun/**/**.java</exclude>
                        <exclude>**/sun/security/**/**.java</exclude>
                        <exclude>**/com/opensymphony/**/**.java</exclude>
                        <exclude>**/com/google/**/**.java</exclude>
                        <exclude>**/com/jcraft/**/**.java</exclude>
                        <exclude>**/io/vertx/**/**.java</exclude>
                        <exclude>**/java/kotlin/**</exclude>
                        <exclude>**/org/jetbrains/**</exclude>
                    </excludes>
                    <properties>
                        <project>Find Security Bugs</project>
                        <owner>Philippe Arteau</owner>
                    </properties>
                </configuration>
                <executions>
                    <execution>
                        <id>regen_lgpl</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>

        </plugins>

    </build>

    <profiles>
        <profile>
            <id>travisci</id> <!-- Profile that is specific for the cloud service Travis-CI (travis-ci.com) -->
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.20</version>
                        <configuration>
                            <argLine>@{argLine} -Xmx3000m -Dbcel.dontCache=true</argLine>
		           <enableAssertions>true</enableAssertions>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>


        <profile>
            <id>signjars</id>
            <activation>
                <property>
                    <name>gpg.passphrase</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <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>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>


        <profile>
            <id>jacoco</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.8.2</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <!-- attached to Maven test phase -->
                            <execution>
                                <id>report</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- SpotBugs for general static code analysis -->
                    <plugin>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs-maven-plugin</artifactId>
                        <version>4.5.3</version>
                        <configuration>
                            <xmlOutput>true</xmlOutput>
                            <failOnError>false</failOnError>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>


    <modules>
        <module>findsecbugs-test-util</module>
        <module>findsecbugs-plugin</module>
        <module>findsecbugs-samples-deps</module>
        <module>findsecbugs-samples-kotlin</module>
        <module>findsecbugs-samples-java</module>
        <module>findsecbugs-samples-jsp</module>
    </modules>


    <!-- All the dependencies are declare here. Modules will refer to those without specifying the version. -->
    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs</artifactId>
                <version>4.5.3</version>
            </dependency>

            <!-- Artefact definition of the module -->

            <dependency>
                <groupId>com.h3xstream.findsecbugs</groupId>
                <artifactId>findsecbugs-test-util</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.h3xstream.findsecbugs</groupId>
                <artifactId>findsecbugs-samples-kotlin</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.h3xstream.findsecbugs</groupId>
                <artifactId>findsecbugs-samples-java</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.h3xstream.findsecbugs</groupId>
                <artifactId>findsecbugs-samples-jsp</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.h3xstream.findsecbugs</groupId>
                <artifactId>findsecbugs-samples-deps</artifactId>
                <version>${project.version}</version>
            </dependency>


            <dependency>
                <groupId>com.h3xstream.findsecbugs</groupId>
                <artifactId>findsecbugs-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- Test dependencies -->

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>4.3.1</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>2.2</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>7.4.0</version>
                <scope>test</scope>
            </dependency>



            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.11.0</version>
                <scope>test</scope>
            </dependency>


            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.26</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>1.2.3</version>
                <scope>test</scope>
            </dependency>




        </dependencies>

    </dependencyManagement>


    <!--
    The following meta data are present to comply with Maven Central.
    Ref: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-6.CentralSyncRequirement
    -->

    <url>https://find-sec-bugs.github.io/</url>

    <licenses>
        <license>
            <name>GNU Lesser General Public License</name>
            <url>http://www.gnu.org/copyleft/lesser.html</url>
            <distribution>repo</distribution>
            <comments />
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/find-sec-bugs/find-sec-bugs.git</connection>
        <developerConnection>scm:git:git@github.com:find-sec-bugs/find-sec-bugs.git</developerConnection>
        <url>git@github.com:find-sec-bugs/find-sec-bugs.git</url>
  </scm>

    <developers>
        <developer>
            <id>h3xstream</id>
            <name>Philippe Arteau</name>
            <url>http://www.h3xstream.com/</url>
        </developer>
    </developers>

    <distributionManagement>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype staging repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>

        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

</project>
