<?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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>pro.shushi.pamirs.middleware.schedule</groupId>
        <artifactId>pamirs-middleware-schedule</artifactId>
        <version>6.2.2</version>
    </parent>

    <artifactId>pamirs-middleware-schedule-deployer</artifactId>
    <name>pamirs-middleware-schedule-deployer</name>

    <dependencies>
        <dependency>
            <groupId>pro.shushi.pamirs.middleware</groupId>
            <artifactId>pamirs-middleware-common</artifactId>
        </dependency>
        <dependency>
            <groupId>pro.shushi.pamirs.middleware.schedule</groupId>
            <artifactId>pamirs-middleware-schedule-core</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>${maven.install.version}</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven.deploy.version}</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>no</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>repackage</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>nosuspend</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>repackage</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <fork>true</fork>
                            <jvmArguments>
                                -server
                                -Xss1M
                                -Xms1G
                                -Xmx1G
                                -XX:+UseG1GC
                                -XX:+UseNUMA
                                -XX:+UseCompressedOops
                                -XX:+ParallelRefProcEnabled
                                -Xdebug
                                -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=10013
                            </jvmArguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>suspend</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>repackage</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <fork>true</fork>
                            <jvmArguments>
                                -server
                                -Xss1M
                                -Xms1G
                                -Xmx1G
                                -XX:+UseG1GC
                                -XX:+UseNUMA
                                -XX:+UseCompressedOops
                                -XX:+ParallelRefProcEnabled
                                -Xdebug
                                -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=10013
                            </jvmArguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>