<?xml version="1.0" encoding="UTF-8"?>
<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">

    <parent>
        <groupId>com.h3xstream.retirejs</groupId>
        <artifactId>retirejs-root-pom</artifactId>
        <version>3.0.0</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.h3xstream.retirejs</groupId>
    <artifactId>retirejs-zap-plugin</artifactId>

    <name>RetireJS (Zed Attack Proxy Plugin)</name>

    <packaging>jar</packaging>

    <properties>
        <zap.addon.version>4</zap.addon.version>
        <zap.addon.status>alpha</zap.addon.status>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/resources-filtered</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

    <profiles>
        <profile>
            <id>bigjar</id> <!-- Need to be deactivate during Maven release -->
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>


            <build>
                <plugins>
                    <!-- Create the final package which include the engine (retirejs-core) -->
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>2.3</version>
                        <executions>
                            <execution>
                                <id>jar-with-dependencies</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <descriptorRefs>
                                        <descriptorRef>jar-with-dependencies</descriptorRef>
                                    </descriptorRefs>
                                    <finalName>retirejs-${zap.addon.status}-${zap.addon.version}</finalName>
                                    <appendAssemblyId>false</appendAssemblyId>
                                    <archive>
                                        <addMavenDescriptor>false</addMavenDescriptor>
                                    </archive>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>

        </profile>
    </profiles>


    <dependencies>

        <!-- Depends on the core module -->

        <dependency>
            <groupId>com.h3xstream.retirejs</groupId>
            <artifactId>retirejs-core</artifactId>
        </dependency>

        <!-- ZAP dependencies -->

        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-configuration</groupId>
            <artifactId>commons-configuration</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.zaproxy</groupId>
            <artifactId>zap</artifactId>
            <version>2.5.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>net.htmlparser.jericho</groupId>
            <artifactId>jericho-html</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>provided</scope>
        </dependency>

    </dependencies>
</project>
