<?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.xuqiudong</groupId>
	<artifactId>parent</artifactId>
	<version>1.0.2</version>
	<packaging>pom</packaging>
	
	<!-- 下列三项是需要的 -->
	<name>springboot项目的父项目</name>
	<description>springboot项目的父项目</description>
	<url>https://gitee.com/xuqiudong/vic-environment</url>



	<!-- 开源许可证声明 有很多不同的开源许可证 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>
		</license>
	</licenses>


	<!--开源地址 -->
	<scm>
		<connection>scm:git:ssh://git@gitee.com:xuqiudong/vic-environment.git</connection>
		<developerConnection>scm:git:https://gitee.com/xuqiudong/vic-environment.git</developerConnection>
		<url>https://gitee.com/xuqiudong/vic-environment</url>
		<tag>HEAD</tag>
	</scm>

	<!-- Issue地址 -->
	<issueManagement>
		<system>git Issue</system>
		<url>https://gitee.com/xuqiudong/vic-environment/issues</url>
	</issueManagement>


	<!-- 开发者信息 -->
	<developers>
		<developer>
			<name>vic.xu</name>
			<email>xuduochoua@163.com</email>
			<roles>
				<role>Developer</role>
			</roles>
			<timezone>+8</timezone>
		</developer>
	</developers>

	<properties>
		<!-- gpg可执行命令路径 -->
		<!-- 
		<gpg.executable>D:\tools\dev\GnuPG\bin\gpg</gpg.executable>
		<gpg.passphrase>12345678</gpg.passphrase> 
		-->
		<vic.boot.version>1.0.2</vic.boot.version>
		<vic.group>io.gitee.xuqiudong</vic.group>
		
		<java.version>1.8</java.version>
		<project.encoding>UTF-8</project.encoding>
		<spring.boot.version>2.1.7.RELEASE</spring.boot.version>
		<javax.servlet>4.0.0</javax.servlet>
		<shiro-spring.version>1.6.0</shiro-spring.version>
		<jwt.auth0.version>3.8.1</jwt.auth0.version>
		<mybatis.starter.version>2.0.1</mybatis.starter.version>
		<pagehelper.starter.version>1.2.10</pagehelper.starter.version>
		<odbc.version>21.1.0.0</odbc.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-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
		<mybatis-generator-maven-plugin.version>1.3.2</mybatis-generator-maven-plugin.version>
		<!-- 此版本被spring-boot使用 -->
		<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
		<!-- 打包时把源码打到本地 -->
		<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
		<!-- copy resources -->
		<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
		<!-- spring boot -->
		<spring-boot-maven-plugin.version>2.4.0</spring-boot-maven-plugin.version>
		<elasticsearch.version>7.7.1</elasticsearch.version>
	</properties>

	<!-- Manage dependent versions of all sub-projects -->
	<dependencyManagement>
		<dependencies>
			<!-- SpringBoot依赖 -->
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${spring.boot.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<!-- parent-util-dependencies -->

			<!--引入工具类相关依赖 -->
			<dependency>
				<groupId>io.gitee.xuqiudong</groupId>
				<artifactId>parent-util-dependencies</artifactId>
				<version>${vic.boot.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>


			<!-- mybatis starter -->
			<dependency>
				<groupId>org.mybatis.spring.boot</groupId>
				<artifactId>mybatis-spring-boot-starter</artifactId>
				<version>${mybatis.starter.version}</version>
			</dependency>

			<!-- pagehelper分页插件依赖 -->
			<dependency>
				<groupId>com.github.pagehelper</groupId>
				<artifactId>pagehelper-spring-boot-starter</artifactId>
				<version>${pagehelper.starter.version}</version>
			</dependency>

			<!-- shiro-spring -->
			<dependency>
				<groupId>org.apache.shiro</groupId>
				<artifactId>shiro-spring</artifactId>
				<version>${shiro-spring.version}</version>
			</dependency>

			<!-- java-jwt 或者io.jsonwebtoken:jjwt -->
			<dependency>
				<groupId>com.auth0</groupId>
				<artifactId>java-jwt</artifactId>
				<version>${jwt.auth0.version}</version>
			</dependency>

			<!-- servlet -->
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>javax.servlet-api</artifactId>
				<version>${javax.servlet}</version>
				<scope>provided</scope>
			</dependency>

			<!-- odbc -->
			<dependency>
				<groupId>com.oracle.database.jdbc</groupId>
				<artifactId>ojdbc8</artifactId>
				<version>${odbc.version}</version>
			</dependency>

			<!-- 重新定义es的版本依赖 start -->
			<dependency>
				<groupId>org.elasticsearch.client</groupId>
				<artifactId>elasticsearch-rest-high-level-client</artifactId>
				<version>${elasticsearch.version}</version>
			</dependency>
			<dependency>
				<groupId>org.elasticsearch</groupId>
				<artifactId>elasticsearch</artifactId>
				<version>${elasticsearch.version}</version>
			</dependency>
			<dependency>
				<groupId>org.elasticsearch.client</groupId>
				<artifactId>elasticsearch-rest-client</artifactId>
				<version>${elasticsearch.version}</version>
			</dependency>
			<!-- 重新定义es的版本依赖 start -->
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
		</dependency>
	</dependencies>





	<!-- 定义仓库地址 -->
	<repositories>
		<repository>
			<!-- <id>aliyun</id> <url>https://maven.aliyun.com/repository/public</url> -->
			<id>tencent</id>
			<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>

	<!-- 插件地址 -->
	<pluginRepositories>
		<pluginRepository>
			<!-- <id>aliyun-plugin</id> -->
			<id>tencent-plugin</id>
			<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
			<!-- <url>https://maven.aliyun.com/repository/public</url> -->
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>


	<!-- 打包到中央仓库的地址 -->

	<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>
				<plugin>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-maven-plugin</artifactId>
					<version>${spring-boot-maven-plugin.version}</version>
					<executions>
						<execution>
							<goals>
								<goal>repackage</goal>
							</goals>
						</execution>
					</executions>
				</plugin>


				<!-- 指定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>
					<inherited>true</inherited>
					<executions>
						<execution>
							<id>bundle-sources</id>
							<phase>package</phase>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
						<maxmemory>1024</maxmemory>
						<encoding>UTF-8</encoding>
						<show>protected</show>
						<notree>true</notree>

						<!-- Avoid running into Java 8's very restrictive doclint issues -->
						<failOnError>true</failOnError>
						<!-- 防止文档不规范报错 -->
						<additionalparam>-Xdoclint:none</additionalparam>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>


		<!-- 在此府项目中引入一些常用插件 -->
		<plugins>
			<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-javadoc-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
		</plugins>
	</build>


	<profiles>
		<profile>
			<!-- 上传的时候使用的配置和插件 -->
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.7</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>
						<version>${maven-release-plugin.version}</version>
						<configuration>
							<autoVersionSubmodules>true</autoVersionSubmodules>
							<useReleaseProfile>false</useReleaseProfile>
							<!-- <releaseProfiles>release</releaseProfiles> -->
							<goals>deploy nexus-staging:release</goals>
							<checkModificationExcludes>
								<checkModificationExclude>pom.xml</checkModificationExclude>
								<checkModificationExclude>**</checkModificationExclude>
							</checkModificationExcludes>
						</configuration>

					</plugin>

					<!-- 11. 生成签名，确定使用那个gpg秘钥 -->
					<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>
								<configuration>
									<keyname>vic.xu</keyname>
									<passphraseServerId>vic.xu</passphraseServerId>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>