<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>3.1.1</version>
        <relativePath/>
    </parent>

    <groupId>org.bardframework</groupId>
    <artifactId>bard-bom</artifactId>
    <version>2.4.20</version>

    <packaging>pom</packaging>
    <name>Bard Framework BOM (Bill of Materials)</name>
    <description>Bard Framework BOM (Bill of Materials)</description>

    <properties>
        <!-- versions -->
        <bardframework.commons.version>2.4.11</bardframework.commons.version>
        <bardframework.crud.version>2.4.12</bardframework.crud.version>
        <bardframework.filestore.version>2.4.13</bardframework.filestore.version>
        <bardframework.form.version>2.4.14</bardframework.form.version>
        <bardframework.validator.version>2.4.15</bardframework.validator.version>
        <jalali-date.version>2.4.17</jalali-date.version>
        <!---->
        <commons-collections4.version>4.4</commons-collections4.version>
        <commons-io.version>2.13.0</commons-io.version>
        <commons-text.version>1.10.0</commons-text.version>
        <!-- Deprecated -->
        <generex.version>1.0.2</generex.version>
        <libphonenumber.version>8.13.15</libphonenumber.version>
        <poi.version>5.2.3</poi.version>
        <reflection.version>0.10.2</reflection.version>
        <springdoc-openapi-starter-webmvc-ui.version>2.1.0</springdoc-openapi-starter-webmvc-ui.version>
        <tika.version>2.8.0</tika.version>
        <yauaa.version>7.20.0</yauaa.version>
        <zxing.version>3.5.1</zxing.version>
        <!-- plugin versions -->
        <sonar-maven-plugin.version>3.9.1.2184</sonar-maven-plugin.version>
        <!-- Deprecated -->
        <dockerfile-maven-plugin.version>1.4.13</dockerfile-maven-plugin.version>
        <jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
        <properties-maven-plugin.version>1.1.0</properties-maven-plugin.version>
        <nexus-staging-maven-plugin.vesion>1.6.13</nexus-staging-maven-plugin.vesion>
        <maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
        <!-- variables -->
        <maven.compiler.release>17</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!--bard-commons...-->
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-captcha</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-config</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-jackson</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-monitoring</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-redis</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-security</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-security-redis</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-sms</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-spring-boot</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-swagger</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-utils</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-utils-persian</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-waf</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-web</artifactId>
                <version>${bardframework.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.commons</groupId>
                <artifactId>common-web</artifactId>
                <version>${bardframework.commons.version}</version>
                <scope>test</scope>
                <type>test-jar</type>
            </dependency>
            <!--...bard-commons-->

            <!--bard-crud...-->
            <dependency>
                <groupId>org.bardframework.crud</groupId>
                <artifactId>crud-api</artifactId>
                <version>${bardframework.crud.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.crud</groupId>
                <artifactId>crud-api</artifactId>
                <version>${bardframework.crud.version}</version>
                <scope>test</scope>
                <type>test-jar</type>
            </dependency>
            <dependency>
                <groupId>org.bardframework.crud</groupId>
                <artifactId>crud-querydsl-sql</artifactId>
                <version>${bardframework.crud.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.crud</groupId>
                <artifactId>crud-table</artifactId>
                <version>${bardframework.crud.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.crud</groupId>
                <artifactId>crud-table</artifactId>
                <version>${bardframework.crud.version}</version>
                <scope>test</scope>
                <type>test-jar</type>
            </dependency>
            <!--...bard-crud-->

            <!--bard-file-store...-->
            <dependency>
                <groupId>org.bardframework.filestore</groupId>
                <artifactId>file-store-api</artifactId>
                <version>${bardframework.filestore.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.filestore</groupId>
                <artifactId>file-store-db</artifactId>
                <version>${bardframework.filestore.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.filestore</groupId>
                <artifactId>file-store-fs</artifactId>
                <version>${bardframework.filestore.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.filestore</groupId>
                <artifactId>file-store-in-memory</artifactId>
                <version>${bardframework.filestore.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.filestore</groupId>
                <artifactId>file-store-redis</artifactId>
                <version>${bardframework.filestore.version}</version>
            </dependency>
            <!--...bard-file-store-->

            <!--bard-form...-->
            <dependency>
                <groupId>org.bardframework.form</groupId>
                <artifactId>bard-flow</artifactId>
                <version>${bardframework.form.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.form</groupId>
                <artifactId>bard-form</artifactId>
                <version>${bardframework.form.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.form</groupId>
                <artifactId>bard-form</artifactId>
                <version>${bardframework.form.version}</version>
                <scope>test</scope>
                <type>test-jar</type>
            </dependency>
            <dependency>
                <groupId>org.bardframework.form</groupId>
                <artifactId>bard-form-common</artifactId>
                <version>${bardframework.form.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bardframework.form</groupId>
                <artifactId>bard-table</artifactId>
                <version>${bardframework.form.version}</version>
            </dependency>
            <!--...bard-form-->

            <!--bard-validator...-->
            <dependency>
                <groupId>org.bardframework.validator</groupId>
                <artifactId>bard-validator</artifactId>
                <version>${bardframework.validator.version}</version>
            </dependency>
            <!--...bard-validator-->

            <!--jalali-date...-->
            <dependency>
                <groupId>org.bardframework</groupId>
                <artifactId>jalali-date</artifactId>
                <version>${jalali-date.version}</version>
            </dependency>
            <!--...jalali-date-->

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>${commons-collections4.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-text</artifactId>
                <version>${commons-text.version}</version>
            </dependency>
            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>${reflection.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
                <version>${springdoc-openapi-starter-webmvc-ui.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mifmif</groupId>
                <artifactId>generex</artifactId>
                <version>${generex.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.zxing</groupId>
                <artifactId>javase</artifactId>
                <version>${zxing.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.zxing</groupId>
                <artifactId>core</artifactId>
                <version>${zxing.version}</version>
            </dependency>
            <dependency>
                <groupId>com.querydsl</groupId>
                <artifactId>querydsl-sql-codegen</artifactId>
                <version>${querydsl.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.validation</groupId>
                        <artifactId>validation-api</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.inject</groupId>
                        <artifactId>javax.inject</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi</artifactId>
                <version>${poi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml</artifactId>
                <version>${poi.version}</version>
            </dependency>
            <dependency>
                <groupId>nl.basjes.parse.useragent</groupId>
                <artifactId>yauaa</artifactId>
                <version>${yauaa.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-core</artifactId>
                <version>${tika.version}</version>
            </dependency>
            <dependency>
                <groupId>com.googlecode.libphonenumber</groupId>
                <artifactId>libphonenumber</artifactId>
                <version>${libphonenumber.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <excludes>
                            <exclude>develop-configuration/**</exclude>
                            <exclude>unused/**</exclude>
                            <exclude>*.xml</exclude>
                        </excludes>
                        <skipIfEmpty>true</skipIfEmpty>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${maven-war-plugin.version}</version>
                    <configuration>
                        <packagingExcludes>
                            WEB-INF/classes/develop-configuration/**,
                            WEB-INF/classes/unused/**,
                            WEB-INF/classes/**.xml,
                        </packagingExcludes>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>properties-maven-plugin</artifactId>
                    <version>${properties-maven-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>com.querydsl</groupId>
                    <artifactId>querydsl-maven-plugin</artifactId>
                    <version>${querydsl.version}</version>
                </plugin>

                <plugin>
                    <groupId>com.spotify</groupId>
                    <artifactId>dockerfile-maven-plugin</artifactId>
                    <version>${dockerfile-maven-plugin.version}</version>
                    <configuration>
                        <dockerfile>Dockerfile</dockerfile>
                        <repository>${dockerfile.repository}</repository>
                        <tag>${dockerfile.tag}</tag>
                        <buildArgs>
                            <BASE_IMAGE>${dockerfile.baseImage}</BASE_IMAGE>
                            <APP_VERSION>${project.version}</APP_VERSION>
                        </buildArgs>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>${sonar-maven-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-maven-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <mainClass>${start-class}</mainClass>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>build-info</goal>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>io.github.git-commit-id</groupId>
                    <artifactId>git-commit-id-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>get-the-git-infos</id>
                            <goals>
                                <goal>revision</goal>
                            </goals>
                            <phase>initialize</phase>
                        </execution>
                    </executions>
                    <configuration>
                        <generateGitPropertiesFile>true</generateGitPropertiesFile>
                        <includeOnlyProperties>
                            <includeOnlyProperty>^git.branch$</includeOnlyProperty>
                            <includeOnlyProperty>^git.commit.id.(abbrev|full)$</includeOnlyProperty>
                        </includeOnlyProperties>
                        <commitIdGenerationMode>full</commitIdGenerationMode>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>publish</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.vesion}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>

            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>

    <developers>
        <developer>
            <name>Vahid Zafari</name>
            <email>va.zafari@gmail.com</email>
        </developer>
    </developers>
</project>
