<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>
	<artifactId>cattle-parent</artifactId>
	<packaging>pom</packaging>
	<name>cattle-parent</name>
	<url>https://gitee.com/yqpkj/cattle-parent</url>
	<description>fast develop framework(cattle) parent</description>
	<parent>
		<groupId>com.yqpkj.fdf</groupId>
		<artifactId>cattle-dependencies</artifactId>
		<version>1.0.16</version>
	</parent>

	<licenses>
		<license>
			<name>MIT</name>
			<url>https://opensource.org/licenses/MIT</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>Yqpkj</name>
			<email>yqpkj@outlook.com</email>
			<organization>Yqpkj tech, Inc.</organization>
			<organizationUrl>https://www.yqpkj.com</organizationUrl>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:https://gitee.com/yqpkj/cattle-parent.git</connection>
		<developerConnection>scm:git:https://gitee.com/yqpkj/cattle-parent.git</developerConnection>
		<url>https://gitee.com/yqpkj/cattle-parent</url>
		<tag>HEAD</tag>
	</scm>
	<build>
		<resources>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>**/application*.yml</include>
					<include>**/application*.yaml</include>
					<include>**/application*.properties</include>
				</includes>
			</resource>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
				<excludes>
					<exclude>**/application*.yml</exclude>
					<exclude>**/application*.yaml</exclude>
					<exclude>**/application*.properties</exclude>
				</excludes>
			</resource>
		</resources>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<configuration>
						<archive>
							<manifest>
								<mainClass>${start-class}</mainClass>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<configuration>
						<archive>
							<manifest>
								<mainClass>${start-class}</mainClass>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<configuration>
						<propertiesEncoding>${project.build.sourceEncoding}</propertiesEncoding>
						<delimiters>
							<delimiter>${resource.delimiter}</delimiter>
						</delimiters>
						<useDefaultDelimiters>false</useDefaultDelimiters>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-maven-plugin</artifactId>
					<executions>
						<execution>
							<id>repackage</id>
							<goals>
								<goal>repackage</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<mainClass>${start-class}</mainClass>
						<fork>true</fork>
					</configuration>
				</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-source-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>

	</build>

	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<distributionManagement>
				<repository>
					<id>sonatype</id>
					<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
				<snapshotRepository>
					<id>sonatype</id>
					<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
				</snapshotRepository>
			</distributionManagement>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<additionalJOption>-Xdoclint:none</additionalJOption>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<!-- GPG -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<keyname>${gpg.keyname}</keyname>
									<passphraseServerId>${gpg.keyname}</passphraseServerId>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<extensions>true</extensions>
						<configuration>
							<serverId>sonatype</serverId>
							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</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>
							<tagNameFormat>v@{project.version}</tagNameFormat>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>