<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.openl.rules</groupId>
        <artifactId>openl-tablets</artifactId>
        <version>5.26.7</version>
        <relativePath>../..</relativePath>
    </parent>
    <artifactId>openl-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <name>OpenL - Maven Plugin</name>
    <url>https://openl-tablets.org</url>
    <organization>
        <name>OpenL Tablets</name>
        <url>https://openl-tablets.org</url>
    </organization>
    <properties>
        <!-- 512MB Should be enough to don't fall in OutOfMemoryError -->
        <invoker.mavenOpts>-Xms16m -Xmx512m -XX:MaxMetaspaceSize=256m -DnoPerf=true</invoker.mavenOpts>
        <skipTestsForQuick>true</skipTestsForQuick>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- dependencies to annotations -->
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
        </dependency>
        <dependency>
            <groupId>com.helger</groupId>
            <artifactId>jcodemodel</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openl.rules</groupId>
            <artifactId>org.openl.rules.project</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openl.rules</groupId>
            <artifactId>org.openl.rules.workspace</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openl.rules</groupId>
            <artifactId>org.openl.rules.repository</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openl.rules</groupId>
            <artifactId>org.openl.rules.ruleservice.deployer</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openl.rules</groupId>
            <artifactId>org.openl.rules.ruleservice.ws</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openl.rules</groupId>
            <artifactId>org.openl.rules.ruleservice.ws.storelogdata.cassandra.annotation</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.openl.rules</groupId>
            <artifactId>org.openl.rules.project.validation.openapi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openl.rules</groupId>
            <artifactId>openl-yaml</artifactId>
        </dependency>
    </dependencies>

    <reporting>
        <plugins>
            <plugin>
                <!-- generate MOJOs documents -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <configuration>
                    <requirements>
                        <maven>3.6</maven>
                        <jdk>11</jdk>
                        <memory>64m</memory>
                    </requirements>
                </configuration>
            </plugin>
            <plugin>
                <!-- Do not generate project reports -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports />
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>install</goal>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <projectsDirectory>it</projectsDirectory>
                    <pomIncludes>
                        <pomInclude>*/pom.xml</pomInclude>
                    </pomIncludes>
                    <setupIncludes>
                        <setupInclude>_1_setup/pom.xml</setupInclude>
                        <setupInclude>_2_install/pom.xml</setupInclude>
                        <setupInclude>_3_performance/pom.xml</setupInclude>
                    </setupIncludes>
                    <preBuildHookScript>setup</preBuildHookScript>
                    <postBuildHookScript>verify</postBuildHookScript>
                    <goals>
                        <goal>clean</goal>
                        <goal>verify</goal>
                    </goals>
                    <streamLogsOnFailures>true</streamLogsOnFailures>
                    <useLocalRepository>true</useLocalRepository>
                    <properties>
                        <maven.compiler.release>11</maven.compiler.release>
                        <openl.info>main</openl.info>
                    </properties>
                    <showErrors>true</showErrors>
                    <mavenOpts>${jacoco.argLine} ${invoker.mavenOpts} -Dapple.awt.UIElement=true</mavenOpts>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>perf</id>
            <activation>
                <property>
                    <name>!noPerf</name>
                </property>
            </activation>
            <properties>
                <!-- Fine tuned settings to detects memory and performance issues -->
                <invoker.mavenOpts>-Xms16m -Xmx64m -XX:MaxMetaspaceSize=192m</invoker.mavenOpts>
            </properties>
        </profile>
    </profiles>
</project>
