<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>com.persagy</groupId>
	<artifactId>calendar-center</artifactId>
	<version>2.0.0</version>

	<properties>
		<!-- java版本 -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.encoding>UTF-8</java.encoding>
		<java.version>8</java.version>
		<java.source.version>1.8</java.source.version>
		<java.target.version>1.8</java.target.version>

		<!-- spring版本依赖 -->
		<integrated-platform.version>2.0.0</integrated-platform.version>
		<spring-boot-dependencies.version>2.1.14.RELEASE</spring-boot-dependencies.version>
		<spring-cloud-dependencies.version>Greenwich.SR6</spring-cloud-dependencies.version>
		<mybatis-spring-boot-starter.version>1.3.2</mybatis-spring-boot-starter.version>

		<!-- 三方jar依赖 -->
		<mybatis-plus.version>3.3.1</mybatis-plus.version>
		<guava.version>20.0</guava.version>

		<!-- maven依赖 -->
		<maven.compiler.version>3.8.0</maven.compiler.version>
		<maven.surefire.version>2.22.1</maven.surefire.version>
		<maven.source.version>3.0.1</maven.source.version>
		<maven.javadoc.version>3.0.1</maven.javadoc.version>
		<maven.gpg.version>1.6</maven.gpg.version>
		<maven.jacoco.version>0.8.3</maven.jacoco.version>
		<maven.jar.version>3.1.0</maven.jar.version>
		<maven.pmd.version>3.8</maven.pmd.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.persagy</groupId>
				<artifactId>integrated-platform</artifactId>
				<version>${integrated-platform.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<!-- 服务依赖 -->
	<dependencies>
		<!-- 依赖集成自定义jar -->
		<dependency>
			<groupId>com.persagy</groupId>
			<artifactId>integrated-config-client</artifactId>
		</dependency>
		<dependency>
			<groupId>com.persagy</groupId>
			<artifactId>integrated-common-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.persagy</groupId>
			<artifactId>integrated-db-spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>com.persagy</groupId>
			<artifactId>integrated-ribbon-spring-boot-starter</artifactId>
		</dependency>
		<!-- <dependency>
			<groupId>com.persagy</groupId>
			<artifactId>integrated-swagger-spring-boot-starter</artifactId>
		</dependency> -->
		<!-- <dependency>
			<groupId>com.persagy</groupId>
			<artifactId>integrated-redis-spring-boot-starter</artifactId>
		</dependency> -->

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>
		
		<!-- web -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<!-- 服务注册 -->
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
		</dependency>

		<!-- mysql -->
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>

		<dependency>
			<groupId>io.micrometer</groupId>
			<artifactId>micrometer-registry-prometheus</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.social</groupId>
			<artifactId>spring-social-security</artifactId>
		</dependency>
		
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-context</artifactId>
		</dependency>

		<dependency>
			<groupId>cn.hutool</groupId>
			<artifactId>hutool-all</artifactId>
		</dependency>

		<!-- fastjson -->
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
		</dependency>

		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
		</dependency>
	</dependencies>

	<build>
		<finalName>${project.artifactId}</finalName>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>repackage</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>${maven.pmd.version}</version>
				<configuration>
					<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
					<minimumPriority>1</minimumPriority>
					<excludeRoots>
						<excludeRoot>com/alibaba/csp/sentinel/benchmark</excludeRoot>
					</excludeRoots>
					<excludes>
						<exclude>**/*_jmhTest.java</exclude>
					</excludes>
					<printFailingErrors>true</printFailingErrors>
					<rulesets>
						<ruleset>rulesets/java/ali-comment.xml</ruleset>
						<ruleset>rulesets/java/ali-concurrent.xml</ruleset>
						<ruleset>rulesets/java/ali-constant.xml</ruleset>
						<ruleset>rulesets/java/ali-exception.xml</ruleset>
						<ruleset>rulesets/java/ali-flowcontrol.xml</ruleset>
						<ruleset>rulesets/java/ali-naming.xml</ruleset>
						<ruleset>rulesets/java/ali-oop.xml</ruleset>
						<ruleset>rulesets/java/ali-orm.xml</ruleset>
						<ruleset>rulesets/java/ali-other.xml</ruleset>
						<ruleset>rulesets/java/ali-set.xml</ruleset>
					</rulesets>
				</configuration>
				<executions>
					<execution>
						<phase>verify</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>com.alibaba.p3c</groupId>
						<artifactId>p3c-pmd</artifactId>
						<version>1.3.6</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven.compiler.version}</version>
				<configuration>
					<source>${java.source.version}</source>
					<target>${java.target.version}</target>
					<encoding>${java.encoding}</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<!-- CircleCI build workaround -->
					<argLine>@{argLine} -Xms1024m -Xmx2048m</argLine>
					<argLine>-Dfile.encoding=UTF-8</argLine>
					<useSystemClassLoader>false</useSystemClassLoader>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${maven.jacoco.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven.surefire.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven.jar.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${maven.gpg.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<build>
				<plugins>
					<!-- Source -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>${maven.source.version}</version>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<!-- Javadoc -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>${maven.javadoc.version}</version>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<locale>en_US</locale>
									<encoding>UTF-8</encoding>
									<charset>UTF-8</charset>
									<doclint>none</doclint>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<!-- GPG -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven.gpg.version}</version>
						<executions>
							<execution>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>

		</profile>
	</profiles>

	<repositories>
		<repository>
			<id>persagy</id>
			<name>releases Repository</name>
			<url>http://47.93.132.139:8081/nexus/content/repositories/persagy/</url>
		</repository>

		<repository>
			<id>integrated</id>
			<name>releases Repository</name>
			<url>http://47.93.132.139:8081/nexus/content/repositories/integrated/</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>aliyun</id>
			<name>releases Repository</name>
			<url>http://maven.aliyun.com/nexus/content/groups/public</url>
		</repository>
	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>central</id>
			<url>http://maven.aliyun.com/nexus/content/groups/public</url>
		</pluginRepository>
	</pluginRepositories>

</project>