<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>

    <parent>
        <groupId>com.workfusion.odf</groupId>
        <artifactId>odf-components-parent</artifactId>
        <version>10.0.0.18</version>
    </parent>

    <artifactId>odf-bcb</artifactId>
    <version>10.0.0.18</version> <!-- Do not remove! Required in CT-->

    <name>ODF Bots</name> <!-- Do not remove! Required in CT-->

    <description>
        BCB Jar package which contains Bot XML configs and Java classes inside. Java classes are embedded using
        Maven Shade plugin, where odf-components and its dependencies are packaged inside this Jar.
    </description>

    <properties>
        <bcb.dev.repo.url>https://repository.workfusion.com/service/local/repositories/wf-machine-config-bundle/content/</bcb.dev.repo.url>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.workfusion.odf</groupId>
            <artifactId>odf-components</artifactId>
            <version>${odf.version}</version>
        </dependency>

        <dependency>
            <groupId>com.workfusion.spa.bot</groupId>
            <artifactId>bot-execution-core</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>${project.build.sourceDirectory}</directory>
                <includes>
                    <include>**/*.groovy</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <source>${project.build.javaVersion}</source>
                    <target>${project.build.javaVersion}</target>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <distributionManagement>
                <repository>
                    <id>bcb-repository</id>
                    <url>${bcb.dev.repo.url}</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>ci</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <distributionManagement>
                <repository>
                    <id>odf-releases</id>
                    <url>https://repository.workfusion.com/content/repositories/releases</url>
                </repository>
                <snapshotRepository>
                    <id>wf-snapshots</id>
                    <url>https://repository.workfusion.com/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
    </profiles>
</project>
