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

    <groupId>com.appjars</groupId>
    <artifactId>parent-pom</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <name>AppJars Root Project</name>
    <description>AppJars Root Project</description>

    <inceptionYear>2023</inceptionYear>
	
    <url>https://www.appjars.com/</url>
	
    <organization>
        <name>Flowing Code</name>
        <url>https://www.flowingcode.com</url>
    </organization>
    
    <developers>
        <developer>
            <id>flowingcode</id>
            <organization>Flowing Code</organization>
            <organizationUrl>https://www.flowingcode.com</organizationUrl>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>AppJars Software License Agreement - Version 1</name>
            <url>https://www.appjars.com/software-license-agreement</url>
        </license>
    </licenses>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <vaadin.version>24.9.9</vaadin.version>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <java.version>17</java.version>
        <junit.jupiter.version>5.11.4</junit.jupiter.version>
        <spring.boot.version>3.5.9</spring.boot.version>
        <spring.core.version>6.2.15</spring.core.version>
        <backend.core.version>1.1.0</backend.core.version>
        <lombok.version>1.18.36</lombok.version>
        <playwright.version>1.51.0</playwright.version>
        <mockito.version>5.14.2</mockito.version>
        <slf4j.version>2.0.17</slf4j.version>
    </properties>


    <repositories>
        <!-- Main Maven repository -->
        <repository>
            <id>central</id>
            <url>https://repo.maven.apache.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <!-- Repository used by Vaadin add-ons -->
        <repository>
            <id>Vaadin Directory</id>
            <url>https://maven.vaadin.com/vaadin-addons</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <!-- The order of definitions matters. Explicitly defining central
            here to make sure it has the highest priority. -->
        <pluginRepository>
            <id>central</id>
            <url>https://repo.maven.apache.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <prerequisites>
        <maven>3.0</maven>
    </prerequisites>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.1</version>
                    <configuration>
                        <useSystemClassLoader>false</useSystemClassLoader>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.7.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.3.1</version>
                    <configuration>
                        <tagNameFormat>@{project.version}</tagNameFormat>
                        <releaseProfiles>release</releaseProfiles>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>2.7.1</version>
                    <configuration>
                        <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.11.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <quiet>true</quiet>
                    <doclint>none</doclint>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>

    <scm>
        <url>https://github.com/AppJars</url>
        <connection>scm:git:git://github.com/AppJars/parent-pom.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:/AppJars/parent-pom.git</developerConnection>
        <tag>1.0.0</tag>
    </scm>
         
    <profiles>
        <profile>
            <id>license</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>license-maven-plugin</artifactId>
                            <configuration>
                                <licenseName>appjars-v1</licenseName>
                                <licenseResolver>classpath://appjars</licenseResolver>
                            </configuration>
                            <dependencies>
                                <dependency>
                                    <groupId>com.appjars</groupId>
                                    <artifactId>license-resolver</artifactId>
                                    <version>1.0.0-SNAPSHOT</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>gpg</id>
            <activation>
                <property>
                    <name>env.MAVEN_GPG_PASSPHRASE</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.7</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.9.0</version>
                        <extensions>true</extensions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
