<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.craftercms.mariaDB4j</groupId>
        <artifactId>mariaDB4j-pom-lite</artifactId>
        <!-- Do NOT depend on a SNAPSHOT here!
             Note that this parent version and the version below are, intentionally, completely unrelated. -->
        <version>2.6.0.1</version>
        <relativePath>mariaDB4j-pom-lite/pom.xml</relativePath>
    </parent>

	<artifactId>mariaDB4j-pom</artifactId>
	<version>2.6.0.1</version>
	<packaging>pom</packaging>

    <scm>
        <!-- The <connection> and <url> are specified in the <parent> but the
             <developerConnection> and the <tag> must be here, for the maven-release-plugin
             to work correctly, if the <parent> is not a SNAPSHOT;
             see https://github.com/vorburger/MariaDB4j/issues/43.
         -->
        <developerConnection>scm:git:git@github.com:craftercms/MariaDB4j.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

	<modules>
		<module>mariaDB4j-pom-lite</module>
        <!-- <module>DBs</module> -->
		<module>mariaDB4j-core</module>
		<module>mariaDB4j</module>
		<module>mariaDB4j-app</module>
		<module>mariaDB4j-springboot</module>
		<module>mariaDB4j-maven-plugin</module>
	</modules>

	<properties>
		 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		 <springframework.version>5.3.27</springframework.version>
		 <springboot.version>2.7.12</springboot.version>
		 <maven.compiler.source>11</maven.compiler.source>
		 <maven.compiler.target>11</maven.compiler.target>

		<maven.compiler.version>3.11.0</maven.compiler.version>
                <maven.source.version>3.2.1</maven.source.version>
                <maven.javadoc.version>3.5.0</maven.javadoc.version>
                <maven.resources.version>3.1.0</maven.resources.version><!-- should upgrade to 3.3.1 when possible -->
                <maven.jar.version>3.3.0</maven.jar.version>
                <maven.war.version>3.3.2</maven.war.version>
                <maven.deploy.version>3.1.1</maven.deploy.version>
                <maven.gpg.version>3.0.1</maven.gpg.version>
                <maven.shade.version>3.3.0</maven.shade.version>
                <maven.clean.version>3.2.0</maven.clean.version>
                <maven.surefire.version>3.0.0</maven.surefire.version>
                <maven.failsafe.version>3.0.0</maven.failsafe.version>
                <jacoco.maven.version>0.8.10</jacoco.maven.version>
                <buildnumber.maven.version>3.0.0</buildnumber.maven.version>
                <grunt.maven.version>1.5.1</grunt.maven.version>
                <gmavenplus.version>2.1.0</gmavenplus.version>
                <appassembler.maven.version>2.1.0</appassembler.maven.version>
                <maven.assembly.version>3.5.0</maven.assembly.version>
                <nexus.staging.maven.version>1.6.13</nexus.staging.maven.version>

	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.10.1</version>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
				</configuration>
			</plugin>

            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.4.1</version>
                <configuration>
                    <quiet>true</quiet>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>3.0.0-M6</version>
				<configuration>
				    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
					<!--https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven
						http://jira.codehaus.org/browse/MGPG-9 & http://jira.codehaus.org/browse/MRELEASE-263 -->
					<mavenExecutorId>forked-path</mavenExecutorId>
					<!-- Following is required because artifactId is (now) mariaDB4j-pom, but we want mariaDB4j -->
					<tagNameFormat>mariaDB4j-@{project.version}</tagNameFormat>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>2.0.0</version>
                <configuration>
                    <licenseName>apache_v2</licenseName>
                    <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                    <failOnMissingHeader>true</failOnMissingHeader>
                    <failOnNotUptodateHeader>true</failOnNotUptodateHeader>
                    <roots>
                        <root>src/main/java</root>
                        <root>src/test/java</root>
                    </roots>
                </configuration>
				<executions>
				    <execution>
				        <phase>validate</phase>
				        <goals>
				            <goal>check-file-header</goal>
				        </goals>
				    </execution>
				</executions>
			</plugin>
<!--
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>3.2.0</version>
				<dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>10.3.3</version>
                    </dependency>
                </dependencies>
				<configuration>
					<configLocation>checkstyle.xml</configLocation>
					<!- https://github.com/vorburger/MariaDB4j/issues/511 ->
					<sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
					<includeTestSourceDirectory>true</includeTestSourceDirectory>
					<encoding>UTF-8</encoding>
					<consoleOutput>true</consoleOutput>
					<failsOnError>true</failsOnError>
				</configuration>
				<executions>
					<execution>
						<id>validate</id>
						<phase>validate</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
-->
		</plugins>
	</build>
	<!--profiles>
		<profile>
                        <id>release-sign-artifacts</id>
                        <activation>
                                <property>
                                        <name>release</name>
                                </property>
                        </activation>
                        <build>
                                <plugins>
                                        <plugin>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-javadoc-plugin</artifactId>
                                        </plugin>
                                        <plugin>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-deploy-plugin</artifactId>
                                                <version>${maven.deploy.version}</version>
                                                <configuration>
                                                        <skip>true</skip>
                                                </configuration>
                                        </plugin>
                                        <plugin>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-gpg-plugin</artifactId>
                                                <version>${maven.gpg.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.version}</version>
                                                <executions>
                                                        <execution>
                                                                <id>default-deploy</id>
                                                                <phase>deploy</phase>
                                                                <goals>
                                                                        <goal>deploy</goal>
                                                                </goals>
                                                        </execution>
                                                </executions>
                                                <configuration>
                                                        <serverId>sonatype-staging</serverId>
                                                        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                                                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                                                </configuration>
                                        </plugin>
                                </plugins>
                        </build>
                </profile>
	</profiles-->

	<dependencyManagement>
	     <dependencies>
	        <dependency>
	            <groupId>org.springframework.boot</groupId>
	            <artifactId>spring-boot-dependencies</artifactId>
	            <version>${springboot.version}</version>
	            <type>pom</type>
	            <scope>import</scope>
	        </dependency>
	        <dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-simple</artifactId>
	            <version>2.0.2</version>
	            <scope>test</scope>
			</dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.11.0</version>
            </dependency>
            <dependency>
                <groupId>commons-dbutils</groupId>
                <artifactId>commons-dbutils</artifactId>
                <version>1.7</version>
                <scope>test</scope>
            </dependency>
	    </dependencies>
	</dependencyManagement>


        <!--repositories>
                <repository>
                        <id>sonatype-snapshots</id>
                        <name>Sonatype Snapshot Repository</name>
                        <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
                        <releases>
                                <enabled>false</enabled>
                        </releases>
                        <snapshots>
                                <enabled>true</enabled>
                                <updatePolicy>always</updatePolicy>
                                <checksumPolicy>fail</checksumPolicy>
                        </snapshots>
                </repository>
        </repositories>

        <distributionManagement>
                <snapshotRepository>
                        <id>sonatype-snapshots</id>
                        <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                        <id>ossrh</id>
                        <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
        </distributionManagement-->

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <!-- http://central.sonatype.org/pages/apache-maven.html -->
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <!-- <repository> isn't needed with nexus-staging-maven-plugin, it somehow
             has this hard-coded or automatically find sit somehow, IFF <version> is non-SNAPSHOT -->
    </distributionManagement>

</project>
