<?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>

	<groupId>cn.benma666</groupId>
	<artifactId>druid-parent</artifactId>
	<version>1.2.22</version>
	<name>${project.artifactId}</name>
	<description>A JDBC datasource implementation.</description>
	<packaging>pom</packaging>
	<url>https://github.com/alibaba/druid</url>
	<inceptionYear>2022</inceptionYear>

	<licenses>
		<license>
			<name>Apache 2</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>
	<scm>
		<url>https://github.com/alibaba/druid</url>
		<connection>scm:git:https://git@github.com/alibaba/druid.git</connection>
	</scm>

	<properties>
		<maven.compiler.source>8</maven.compiler.source>
		<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<spring.version>4.3.20.RELEASE</spring.version>

		<springframework5.version>5.3.27</springframework5.version>
		<springframework6.version>6.0.8</springframework6.version>
		<springboot2.version>2.7.9</springboot2.version>
		<springboot3.version>3.0.6</springboot3.version>

		<junit.version>4.13.1</junit.version>
		<jmh.version>1.37</jmh.version>

		<gpg.skip>false</gpg.skip>
		<javadoc.skip>false</javadoc.skip>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<jdk.version>1.8</jdk.version>

		<maven.deploy.skip>false</maven.deploy.skip>
	</properties>

	<modules>
		<module>core</module>
		<module>druid-spring-boot-starter</module>
		<module>druid-wrapper</module>
<!--		<module>druid-demo-petclinic</module>-->
	</modules>

	<organization>
		<name>Alibaba Group</name>
		<url>https://github.com/alibaba</url>
	</organization>
	<developers>
		<developer>
			<id>wenshao</id>
			<name>wenshao</name>
			<email>szujobs@hotmail.com</email>
		</developer>
		<developer>
			<id>kiki</id>
			<name>kiki</name>
			<email>little.fierydragon@gmail.com</email>
		</developer>
		<developer>
			<id>yako</id>
			<name>yako</name>
			<email>yakolyh@gmail.com</email>
		</developer>
	</developers>

	<distributionManagement>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<dependencyManagement>
		<dependencies>
			<!-- spring libs -->
		</dependencies>
	</dependencyManagement>

	<dependencies>
	</dependencies>

	<build>
		<plugins>
			<!--
                Compiling Kotlin and Java sources - Using Maven - Kotlin Programming Language
                https://kotlinlang.org/docs/reference/using-maven.html#compiling-kotlin-and-java-sources

                Making sure that the kotlin plugin is above the maven-compiler-plugin in your pom.xml file!
            -->
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<annotationProcessorPaths>
						<path>
							<groupId>org.openjdk.jmh</groupId>
							<artifactId>jmh-generator-annprocess</artifactId>
							<version>${jmh.version}</version>
						</path>
					</annotationProcessorPaths>
					<parameters>true</parameters>
				</configuration>
				<executions>
					<!-- Replacing default-compile as it is treated specially by maven -->
					<execution>
						<id>default-compile</id>
						<phase>none</phase>
					</execution>
					<!-- Replacing default-testCompile as it is treated specially by maven -->
					<execution>
						<id>default-testCompile</id>
						<phase>none</phase>
					</execution>
					<execution>
						<id>java-compile</id>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
					<execution>
						<id>java-test-compile</id>
						<phase>test-compile</phase>
						<goals>
							<goal>testCompile</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>3.1.2</version>
				<dependencies>
					<dependency>
						<groupId>com.puppycrawl.tools</groupId>
						<artifactId>checkstyle</artifactId>
						<version>9.2</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<id>checkstyle</id>
						<phase>validate</phase>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<skip>false</skip>
							<failOnViolation>true</failOnViolation>
							<includeTestSourceDirectory>false</includeTestSourceDirectory>
							<configLocation>src/checkstyle/druid-checks.xml</configLocation>
							<excludes>
							</excludes>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.2.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.3.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.2.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.10.1</version>
				</plugin>
				<!--生成API文档插件-->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<executions>
						<execution>
							<id>attach-javadoc</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<skip>${javadoc.skip}</skip>
						<doclint>none</doclint>
						<charset>${project.build.sourceEncoding}</charset>
						<encoding>${project.build.sourceEncoding}</encoding>
						<docencoding>${project.build.sourceEncoding}</docencoding>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.0.0-M7</version>
				</plugin>
				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>3.4.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.12.1</version>
				</plugin>
				<!--gpg插件-->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.5</version>
					<configuration>
						<skip>${gpg.skip}</skip>
					</configuration>
					<executions>
						<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-install-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>
<!--				<plugin>-->
<!--					<artifactId>maven-deploy-plugin</artifactId>-->
<!--					<version>3.0.0</version>-->
<!--				</plugin>-->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.3</version>
					<configuration>
						<autoVersionSubmodules>true</autoVersionSubmodules>
						<useReleaseProfile>false</useReleaseProfile>
						<releaseProfiles>release</releaseProfiles>
						<goals>deploy</goals>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-shade-plugin</artifactId>
					<version>3.3.0</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.13</version>
				</plugin>
				<plugin>
					<groupId>org.moditect</groupId>
					<artifactId>moditect-maven-plugin</artifactId>
					<version>1.0.0.RC2</version>
					<executions>
						<execution>
							<id>add-module-infos</id>
							<phase>package</phase>
							<goals>
								<goal>add-module-info</goal>
							</goals>
							<configuration>
								<jvmVersion>9</jvmVersion>
								<overwriteExistingFiles>true</overwriteExistingFiles>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<!--注意,此id必须与setting.xml中指定的一致,不要自作聪明改它名字 releases  snapshots-->
			<id>releases</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<!--发布到中央SNAPSHOT仓库插件-->
				<plugins>
<!--					<plugin>-->
<!--						<groupId>org.sonatype.plugins</groupId>-->
<!--						<artifactId>nexus-staging-maven-plugin</artifactId>-->
<!--					</plugin>-->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-resources-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
					</plugin>
					<!-- clean插件 -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-clean-plugin</artifactId>
					</plugin>
					<!--生成源码插件-->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
					</plugin>

					<!--生成API文档插件-->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>

					<!--gpg插件-->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-dependency-plugin</artifactId>
					</plugin>
				</plugins>
			</build>

			<distributionManagement>
				<snapshotRepository>
					<!--注意,此id必须与setting.xml中指定的一致  releases  snapshots-->
					<id>releases</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
				<repository>
					<id>releases</id>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
				</repository>
			</distributionManagement>
		</profile>
	</profiles>
</project>
