<?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>group.springframework</groupId>
	<artifactId>spring-cloud-dependencies-parent</artifactId>
	<version>2021.0.7</version>
	<packaging>pom</packaging>

	<name>spring-cloud-dependencies-parent</name>
	<url>pig spring cloud parent</url>
	<description>此坐标为 pom ，源码可在商业版仓库下载。避免maven 循环依赖无实际意义</description>
	<licenses>
		<license>
			<name>The ApacheSoftware License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>lengleng</name>
			<email>wangiegie@gmail.com</email>
			<roles>
				<role>leader</role>
			</roles>
		</developer>
	</developers>
	<scm>
		<tag>master</tag>
		<connection>https://gitee.wang/lengleng/pig</connection>
		<developerConnection>https://pig4cloud.com</developerConnection>
		<url>https://gitee.wang/lengleng/pig.git</url>
	</scm>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<javaformat.plugin.version>0.0.23</javaformat.plugin.version>
		<docker.plugin.version>0.33.0</docker.plugin.version>
		<cloud.plugin.version>1.0.0</cloud.plugin.version>
	</properties>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<!-- Source -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.2.1</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>2.9.1</version>
						<configuration>
							<show>private</show>
							<nohelp>true</nohelp>
							<charset>UTF-8</charset>
							<encoding>UTF-8</encoding>
							<docencoding>UTF-8</docencoding>
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<!-- GPG -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.8</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>sonatype</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
			<distributionManagement>
				<snapshotRepository>
					<id>sonatype</id>
					<url>
						https://oss.sonatype.org/content/repositories/snapshots/
					</url>
				</snapshotRepository>
				<repository>
					<id>sonatype</id>
					<url>
						https://oss.sonatype.org/service/local/staging/deploy/maven2/
					</url>
				</repository>
			</distributionManagement>
		</profile>
	</profiles>


	<build>
		<plugins>
			<!--避免和parent bom坐标不一致 -->
			<plugin>
				<groupId>group.springframework.plugin</groupId>
				<artifactId>spring-cloud-maven-plugin</artifactId>
				<version>${cloud.plugin.version}</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>info</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- nothing to do, but we need this to run docker:build form project root -->
			<plugin>
				<groupId>io.fabric8</groupId>
				<artifactId>docker-maven-plugin</artifactId>
				<version>${docker.plugin.version}</version>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
			<!--代码格式插件，默认使用spring 规则-->
			<plugin>
				<groupId>io.spring.javaformat</groupId>
				<artifactId>spring-javaformat-maven-plugin</artifactId>
				<version>${javaformat.plugin.version}</version>
			</plugin>
		</plugins>
	</build>
</project>
