<?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>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.1.RELEASE</version>
        <relativePath />
    </parent>
    <groupId>com.broadleafcommerce</groupId>
    <artifactId>broadleaf-boot-starter-hsql-database</artifactId>
    <version>2.1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name>BroadleafCommerce HSQLDB Database Starter</name>
    <description>HSQL database starter for Broadleaf Commerce persistence units</description>
    <licenses>
        <license>
            <name>Broadleaf Fair Use 1.0</name>
            <url>http://license.broadleafcommerce.org/fair_use_license-1.0.txt</url>
            <distribution>repo</distribution>
            <comments>Fair Use Community License</comments>
        </license>
        <license>
            <name>Broadleaf End User License Agreement 1.1</name>
            <url>http://license.broadleafcommerce.org/commercial_license-1.1.txt</url>
            <distribution>repo</distribution>
            <comments>Commercial License Applicable When Bounds of Fair Use License Are Exceeded</comments>
        </license>
    </licenses>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <project.uri>${project.baseUri}</project.uri>
        <!-- Sonar does not differentiate between integration (*IT.java) and unit (*Test.java) tests,
            so give Sonar the combined versions -->
        <jacoco.merge.root>${project.reporting.outputDirectory}</jacoco.merge.root>
        <sonar.coverage.jacoco.xmlReportPaths>${jacoco.merge.root}/jacoco-merged/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
        <sonar.junit.reportPaths>target/surefire-reports,target/failsafe-reports</sonar.junit.reportPaths>
        <!-- Maven plugin/helper versions -->
        <maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
        <maven.animalsniffer.plugin.version>1.18</maven.animalsniffer.plugin.version>
        <maven.release.plugin.version>2.5.3</maven.release.plugin.version>
        <maven.jacoco.plugin.version>0.8.5</maven.jacoco.plugin.version>
    </properties>
    <scm>
        <connection>scm:git:git@github.com:BroadleafCommerce/HSQLDatabaseStarter.git</connection>
        <developerConnection>scm:git:git@github.com:BroadleafCommerce/HSQLDatabaseStarter.git</developerConnection>
        <url>https://github.com/BroadleafCommerce/HSQLDatabaseStarter</url>
        <tag>HEAD</tag>
    </scm>
    <repositories>
        <repository>
            <id>community-snapshots</id>
            <name>community-snapshots</name>
            <url>http://nexus.broadleafcommerce.org/nexus/content/groups/community-snapshots/</url>
        </repository>
        <repository>
            <id>community-releases</id>
            <name>community-releases</name>
            <url>http://nexus.broadleafcommerce.org/nexus/content/groups/community-releases/</url>
        </repository>
    </repositories>
    <distributionManagement>
        <snapshotRepository>
            <id>snapshots</id>
            <url>http://nexus.broadleafcommerce.org/nexus/content/repositories/framework-snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>releases</id>
            <url>http://nexus.broadleafcommerce.org/nexus/content/repositories/framework-releases/</url>
        </repository>
    </distributionManagement>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>1.12</version>
                    <configuration>
                        <verbose>false</verbose>
                        <addSvnKeyWords>false</addSvnKeyWords>
                        <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                        <organizationName>Broadleaf Commerce</organizationName>
                        <inceptionYear>2009</inceptionYear>
                        <licenseName>blc_confidential</licenseName>
                        <licenseResolver>${project.baseUri}/licenses</licenseResolver>
                        <excludes>
                            <exclude>**/*.sql</exclude>
                            <exclude>**/*.html</exclude>
                            <exclude>**/*font-awesome*</exclude>
                            <exclude>**/*jquery*</exclude>
                            <exclude>**/*modernizr*</exclude>
                            <exclude>**/*responsive-tables*</exclude>
                            <exclude>**/spectrum.css</exclude>
                            <exclude>**/spectrum.js</exclude>
                            <exclude>**/redactor.js</exclude>
                            <exclude>**/ace-src-min-noconflict/**</exclude>
                            <exclude>**/sitemap/**/*.xml</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>first</id>
                            <goals>
                                <goal>update-file-header</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <roots>
                                    <root>src/main</root>
                                    <root>src/test</root>
                                </roots>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <!-- IMPORTANT: once this updates to the 3.0 line, we can remove the disableClassPathURLCheck
                        arg line settings -->
                    <!-- See https://stackoverflow.com/questions/53010200/maven-surefire-could-not-find-forkedbooter-class/53016532 -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <argLine> -Djdk.net.URLClassPath.disableClassPathURLCheck=true -Xmx1g 
                        </argLine>
                        <!-- Workaround to ensure @Nested classes are executed see https://github.com/junit-team/junit5/issues/1377#issuecomment-381964988 -->
                        <excludes>
                            <exclude />
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <configuration>
                        <argLine> -Djdk.net.URLClassPath.disableClassPathURLCheck=true -Xmx1g 
                        </argLine>
                        <!-- Workaround to ensure @Nested classes are executed see https://github.com/junit-team/junit5/issues/1377#issuecomment-381964988 -->
                        <excludes>
                            <exclude />
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-maven-plugin</artifactId>
                    <version>${maven.animalsniffer.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>sniff</id>
                            <phase>test</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <signature>
                            <groupId>org.codehaus.mojo.signature</groupId>
                            <artifactId>java18</artifactId>
                            <version>1.0</version>
                        </signature>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <defaultVersion>${project.version}</defaultVersion>
                        <aggregate>true</aggregate>
                        <minmemory>128m</minmemory>
                        <maxmemory>1g</maxmemory>
                        <doclint>none</doclint>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven.release.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <licenseName>blc_dual</licenseName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>animal-sniffer-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>javadocs</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>sources</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>coverage</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <configuration>
                                <argLine> -Xmx1g
                                    -Djdk.net.URLClassPath.disableClassPathURLCheck=true
                                    @{surefire.argLine} 
                                </argLine>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-failsafe-plugin</artifactId>
                            <configuration>
                                <argLine> -Xmx1g
                                    -Djdk.net.URLClassPath.disableClassPathURLCheck=true
                                    @{failsafe.argLine} 
                                </argLine>
                            </configuration>
                        </plugin>
                        <!-- Jacoco Code Coverage Plugin -->
                        <plugin>
                            <groupId>org.jacoco</groupId>
                            <artifactId>jacoco-maven-plugin</artifactId>
                            <version>${maven.jacoco.plugin.version}</version>
                            <executions>
                                <!-- Unit test coverage prep; generates jacoco.exec -->
                                <execution>
                                    <goals>
                                        <goal>prepare-agent</goal>
                                    </goals>
                                    <configuration>
                                        <propertyName>surefire.argLine</propertyName>
                                        <append>true</append>
                                    </configuration>
                                </execution>
                                <!-- Unit test coverage report -->
                                <execution>
                                    <id>report</id>
                                    <phase>test</phase>
                                    <goals>
                                        <goal>report</goal>
                                    </goals>
                                </execution>
                                <!-- Integration test prep -->
                                <execution>
                                    <id>pre-integration-test</id>
                                    <phase>pre-integration-test</phase>
                                    <goals>
                                        <goal>prepare-agent-integration</goal>
                                    </goals>
                                    <configuration>
                                        <propertyName>failsafe.argLine</propertyName>
                                    </configuration>
                                </execution>
                                <!-- Integration test report -->
                                <execution>
                                    <id>post-integration-test</id>
                                    <phase>post-integration-test</phase>
                                    <goals>
                                        <goal>report-integration</goal>
                                    </goals>
                                </execution>
                                <!-- Sonar doesn't like reporting off of multiple places, merge them
                                    together -->
                                <execution>
                                    <id>sonar-consolidated-pre-integration-test</id>
                                    <phase>post-integration-test</phase>
                                    <goals>
                                        <goal>merge</goal>
                                    </goals>
                                    <configuration>
                                        <destFile>${project.build.directory}/jacoco-merged.exec</destFile>
                                        <fileSets>
                                            <fileSet>
                                                <directory>${project.build.directory}</directory>
                                                <includes>
                                                    <include>*.exec</include>
                                                </includes>
                                            </fileSet>
                                        </fileSets>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>sonar-consolidated-post-integration-test</id>
                                    <phase>post-integration-test</phase>
                                    <goals>
                                        <goal>report-integration</goal>
                                    </goals>
                                    <configuration>
                                        <dataFile>${project.build.directory}/jacoco-merged.exec</dataFile>
                                        <outputDirectory>${jacoco.merge.root}/jacoco-merged</outputDirectory>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- IMPORTANT -->
            <!-- This relies on a gpg.passphrase property set either at build time or in a settings.xml.
                If within
                a <profile><properties> section, that <profile><id> must match _exactly_ to this id for
                gpg.passphrase to be picked up.
                You know you have messed up if, on signing, GPG signing fails with this message:
                "gpg: signing failed: Inappropriate ioctl for device" -->
            <id>sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <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>
                                <configuration>
                                    <keyname>info@broadleafcommerce.org</keyname>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
        </dependency>
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</project>