<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>io.gitee.itxinmeng</groupId>
	<artifactId>mx-encrypt-spring-boot-starter</artifactId>
	<version>0.0.14</version>
	<name>mx-encrypt-spring-boot-starter</name>
	<description>Interface encrypt project for Spring Boot</description>
	<url>https://gitee.com/itxinmeng/mx-encrypt-spring-boot-starter</url>

	<properties>
		<java.version>1.8</java.version>
		<project.encoding>UTF-8</project.encoding>
		<springboot-version>2.5.15</springboot-version>
		<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
		<maven-surefire-plugin.version>2.19</maven-surefire-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
		<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
		<maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
		<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
	</properties>

	<!-- 开源许可证声明 有很多不同的开源许可证 Apache Version2.0 表示别人可以直接商用你的开源项目而无任何版权问题 -->
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<!--开源地址 -->
	<scm>
		<connection>scm:git:git@gitee.com:itxinmeng/mx-encrypt-spring-boot-starter.git</connection>
		<developerConnection>scm:git:git@gitee.com:itxinmeng/mx-encrypt-spring-boot-starter.git</developerConnection>
		<url>https://gitee.com/itxinmeng/mx-encrypt-spring-boot-starter</url>
		<tag>HEAD</tag>
	</scm>

	<!-- 开发者信息 -->
	<developers>
		<developer>
			<name>nicky.meng</name>
			<email>nicky.meng@qq.com</email>
			<roles>
				<role>Developer</role>
			</roles>
			<timezone>+8</timezone>
		</developer>
	</developers>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
			<optional>true</optional> <!-- 表示依赖不会传递 -->
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-jdbc</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>cn.hutool</groupId>
			<artifactId>hutool-all</artifactId>
			<version>5.8.4</version>
			<optional>true</optional>
		</dependency>

	</dependencies>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${springboot-version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>


	<!-- 打包到中央仓库的地址 -->
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</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>
	<build>
		<pluginManagement>
			<plugins>

				<!-- 指定jdk和编码 -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
						<encoding>${project.encoding}</encoding>
					</configuration>
				</plugin>
				<!-- 跳过测试 -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven-surefire-plugin.version}</version>
					<configuration>
						<skipTests>true</skipTests>
					</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>
							<phase>verify</phase>
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<!-- copy resources -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${maven-resources-plugin.version}</version>
				</plugin>
				<!--打jar插件 -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven-jar-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
					<configuration>
						<additionalparam>-Xdoclint:none</additionalparam>
						<encoding>${project.encoding}</encoding>
						<charset>${project.encoding}</charset>
						<docencoding>${project.encoding}</docencoding>
					</configuration>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.6</version>
					<configuration>
						<gpgArguments>
							<arg>--pinentry-mode</arg>
							<arg>loopback</arg>
						</gpgArguments>
					</configuration>
					<executions>
						<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>


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

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
			</plugin>
			<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-gpg-plugin</artifactId>
			</plugin>

		</plugins>
	</build>

	<profiles>
		<profile>
			<!-- 上传的时候使用的配置和插件 -->
			<id>release</id>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.sonatype.plugins</groupId>
							<artifactId>nexus-staging-maven-plugin</artifactId>
							<version>1.6.3</version>
							<extensions>true</extensions>
							<configuration>
								<!-- 这里的id必须要和全局配置中的server一致 -->
								<serverId>ossrh</serverId>
								<!-- 这个地址，一定要和issue的评论中给出的地址一致！ -->
								<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
								<!-- 如果希望发布后自动执行close和release操作，此处可以调整为true -->
								<autoReleaseAfterClose>false</autoReleaseAfterClose>
							</configuration>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-release-plugin</artifactId>
							<configuration>
								<autoVersionSubmodules>true</autoVersionSubmodules>
								<useReleaseProfile>false</useReleaseProfile>
								<releaseProfiles>release</releaseProfiles>
								<goals>deploy</goals>
							</configuration>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-gpg-plugin</artifactId>
							<version>1.5</version>
							<executions>
								<execution>
									<id>sign-artifacts</id>
									<phase>verify</phase>
									<goals>
										<goal>sign</goal>
									</goals>
								</execution>
							</executions>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-javadoc-plugin</artifactId>
							<version>2.9.1</version>
							<configuration>
								<additionalparam>-Xdoclint:none</additionalparam>
							</configuration>
							<executions>
								<execution>
									<id>attach-javadocs</id>
									<goals>
										<goal>jar</goal>
									</goals>
								</execution>
							</executions>
						</plugin>
					</plugins>
				</pluginManagement>

			</build>
		</profile>
	</profiles>

</project>
