<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.retirejs</groupId>
    <artifactId>retirejs-root-pom</artifactId>
    <version>3.0.2</version>

    <packaging>pom</packaging>

    <name>Retire.JS proxy scanner (root pom.xml)</name>
    <description>The root pom file aggregate the dependencies use by the Retire.js extensions.</description>

    <profiles>
        <profile>
            <id>all-modules</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>retirejs-core</module>
                <module>retirejs-burp-plugin</module>
                <module>retirejs-zap-plugin</module>
                <module>retirejs-maven-plugin</module>
            </modules>
        </profile>

        <profile>  <!-- The Burp Team is allergic to ZAP. They don't want to compile a ZAP plugin ever. ;) -->
            <id>burp-only</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <modules>
                <module>retirejs-core</module>
                <module>retirejs-burp-plugin</module>
            </modules>
        </profile>

        <profile>
            <id>signjars</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </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>
    </profiles>

    <properties>
        <!-- Encoding configuration -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <dependency.locations.enabled>false</dependency.locations.enabled>
        <doclint>none</doclint>
    </properties>

    <build>
        <pluginManagement>
            <plugins>

                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>

                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>

                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>

            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>

            <!-- Force the use of Java 7 compiler -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
            </plugin>

            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.5.2</version>
            </plugin>

            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.7.1</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                    <javaApiLinks>
                        <property>
                            <name>foo</name>
                            <value>bar</value>
                        </property>
                    </javaApiLinks>
                </configuration>
            </plugin>

        </plugins>
    </build>


    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>net.portswigger.burp.extender</groupId>
                <artifactId>burp-extender-api</artifactId>
                <version>2.1</version>
                <scope>provided</scope>
            </dependency>

            <!-- Sub modules versions -->

            <dependency>
                <groupId>com.h3xstream.retirejs</groupId>
                <artifactId>retirejs-core</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- Logging for the core module -->

            <dependency>
                <groupId>com.esotericsoftware</groupId>
                <artifactId>minlog</artifactId>
                <version>1.3.1</version>
            </dependency>

            <!-- Micro template engine -->
            <dependency>
                <groupId>com.github.spullara.mustache.java</groupId>
                <artifactId>compiler</artifactId>
                <version>0.9.6</version>
            </dependency>

            <!-- JSON parser use by the core -->

            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20190722</version>
            </dependency>

            <!-- ZAP stuff -->

            <dependency>
                <groupId>org.zaproxy</groupId>
                <artifactId>zap</artifactId>
				<!-- We deliberately keep this set to an old ZAP version so we know this 
				     plugin works with older versions of ZAP too -->
                <version>2.8.0</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>net.htmlparser.jericho</groupId>
                <artifactId>jericho-html</artifactId>
                <version>3.4</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>commons-httpclient</groupId>
                <artifactId>commons-httpclient</artifactId>
                <version>3.1</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>commons-configuration</groupId>
                <artifactId>commons-configuration</artifactId>
                <version>1.10</version>
                <scope>provided</scope>
            </dependency>


            <!-- Log4J -->
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
                <scope>provided</scope>
            </dependency>

            <!-- Test libraries (Unit testing) -->

            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>7.0.0</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.6</version>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>1.10.19</version>
                <scope>test</scope>
            </dependency>

            <!-- Maven API -->
            <!-- Upgrading these to 3.5.3 is an API breaking change. 
                 And 2.2.1 is last in that branch. -->
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-plugin-api</artifactId>
                <version>2.2.1</version>
            </dependency>

            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-core</artifactId>
                <version>2.2.1</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <reporting>
        <outputDirectory>${basedir}/target/site</outputDirectory>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.5</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>dependency-updates-report</report>
                            <report>plugin-updates-report</report>
                            <report>property-updates-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.9</version>
            </plugin>

            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <version>3.3.4</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <!--
    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://github.com/h3xstream/burp-retire-js</url>

    <licenses>
        <license>
            <name>GNU Lesser General Public License</name>
            <url>http://www.gnu.org/copyleft/lesser.html</url>
            <distribution>repo</distribution>
            <comments></comments>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/h3xstream/burp-retire-js.git</connection>
        <developerConnection>scm:git:git@github.com:h3xstream/burp-retire-js.git</developerConnection>
        <url>git@github.com:h3xstream/burp-retire-js.git</url>
    </scm>

    <developers>
        <developer>
            <id>h3xstream</id>
            <name>Philippe Arteau</name>
            <url>https://github.com/h3xstream</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>
