<?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>io.github.hlg212</groupId>
    <artifactId>parent</artifactId>
    <packaging>pom</packaging>
    <version>1.1.2</version>
    <name>${project.artifactId}</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <!-- plugins -->
        <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
        <maven-eclipse-plugin.version>2.8</maven-eclipse-plugin.version>
        <maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
        <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
        <maven-site-plugin.version>3.6</maven-site-plugin.version>
        <maven-project-info-reports-plugin.version>2.9</maven-project-info-reports-plugin.version>
        <maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
        <spring-boot-maven-plugin.version>2.0.3.RELEASE</spring-boot-maven-plugin.version>
		<flatten-maven-plugin.version>1.1.0</flatten-maven-plugin.version>
		<maven-jar-plugin.version>2.6</maven-jar-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>


        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <maven-dependency-plugin.skip>true</maven-dependency-plugin.skip>
		<maven-deploy-plugin.skip>false</maven-deploy-plugin.skip>
        <maven-gpg-plugin.skip>true</maven-gpg-plugin.skip>
        <maven-javadoc-plugin.skip>true</maven-javadoc-plugin.skip>


        <spring-boot-maven-plugin.skip>false</spring-boot-maven-plugin.skip>

		<flatten.flattenMode>oss</flatten.flattenMode>
		<flatten.updatePomFile>false</flatten.updatePomFile>

		<flatten.pomElements.distributionManagement>keep</flatten.pomElements.distributionManagement>
        <flatten.pomElements.parent>resolve</flatten.pomElements.parent>
        <flatten.pomElements.build>keep</flatten.pomElements.build>
        <flatten.pomElements.properties>resolve</flatten.pomElements.properties>
        <flatten.pomElements.scm>keep</flatten.pomElements.scm>

        <project.scm.id>my-scm-server</project.scm.id>
    </properties>

    <description>FCF工程构建管理工程,统一项目构建方式</description>

    <url>https://github.com/hlg212/FCFP</url>

    <scm>
        <connection>scm:git:https://github.com/hlg212/FCFP.git</connection>
        <developerConnection>scm:git:https://github.com/hlg212/FCFP.git</developerConnection>
        <url>https://github.com/hlg212/FCFP.git</url>
        <tag>parent-1.1.2</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>nexus-snapshot</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
            <uniqueVersion>true</uniqueVersion>
        </snapshotRepository>
        <repository>
            <id>nexus-release</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <pluginRepositories>
        <pluginRepository>
            <id>spring-snapshots</id>
            <url>https://repo.spring.io/snapshot</url>
        </pluginRepository>
        <pluginRepository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
        </pluginRepository>
    </pluginRepositories>
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>黄礼桂</name>
            <email>xiaolaoban212@qq.com</email>
        </developer>
    </developers>

    <build>
		 <finalName>${project.name}</finalName>
		 
        <resources>
			 <resource>
                <targetPath>${project.build.directory}/classes</targetPath>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
            <resource>
                <targetPath>${project.build.directory}/classes</targetPath>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.yml</include>
                </includes>
            </resource>

        </resources>
		
        <plugins>

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring-boot-maven-plugin.version}</version>
                <configuration>
                    <skip>${spring-boot-maven-plugin.skip}</skip>
                    <!--<fork>true</fork>-->
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
						 <configuration>
                            <attach>false</attach>
                            <classifier>exec</classifier>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven-gpg-plugin.version}</version>
                <configuration>
                    <skip>${maven-gpg-plugin.skip}</skip>
                </configuration>
                <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-deploy-plugin</artifactId>
                <version>${maven-deploy-plugin.version}</version>
                <configuration>
                    <!-- <uniqueVersion>false</uniqueVersion> -->
					<skip>${maven-deploy-plugin.skip}</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>${maven-eclipse-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <skip>false</skip>
                    <failOnError>true</failOnError>
                    <verbose>true</verbose>
                    <fork>true</fork>
                    <compilerArgument>-nowarn</compilerArgument>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <encoding>UTF-8</encoding>
                </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>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
                <configuration>
                    <releaseProfiles>release</releaseProfiles>
                    <checkModificationExcludeList>.project,.classpath,pom.xml,.settings,target</checkModificationExcludeList>
<!--                    <username>${git.name}</username>-->
<!--                    <password>${git.pwd}</password>-->
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>${maven.compiler.source}</source>
                    <skip>${maven-javadoc-plugin.skip}</skip>
                    <failOnError>false</failOnError>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven-resources-plugin.version}</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <configuration>
                    <skip>${maven-dependency-plugin.skip}</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <type>jar</type>
                            <includeTypes>jar</includeTypes>
                            <outputDirectory>
                                ${project.build.directory}/lib
                            </outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
			
			<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
			 <version>${maven-jar-plugin.version}</version>
			<configuration>
                    <useDefaultManifestFile>true</useDefaultManifestFile>
                </configuration>
            </plugin>
			
			<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>flatten-maven-plugin</artifactId>
            </plugin>
			
        </plugins>
		
		 <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>flatten-maven-plugin</artifactId>
                    <configuration>
                        <!-- --> <updatePomFile>${flatten.updatePomFile}</updatePomFile>
                        <flattenMode>${flatten.flattenMode}</flattenMode>

                        <pomElements>
                            <distributionManagement>${flatten.pomElements.distributionManagement}</distributionManagement>
                            <build>${flatten.pomElements.build}</build>
                            <properties>${flatten.pomElements.properties}</properties>
                            <scm>${flatten.pomElements.scm}</scm>

                        </pomElements>

                    </configuration>

                    <executions>

                        <execution>
                            <id>flatten</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>flatten</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>flatten-clean</id>
                            <phase>clean</phase>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                        </execution>
                    </executions>
                    <version>${flatten-maven-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>