<?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">
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>cool.happycoding</groupId>
    <artifactId>happy-code</artifactId>
    <version>1.0.0.RELEASE</version>
    <packaging>pom</packaging>

    <name>happy-code</name>
    <description>微服务技术组件</description>
    <url>https://github.com/happy-coding-cool/happy-code</url>

    <properties>
        <!--组件版本-->
        <happy-code.version>1.0.0.RELEASE</happy-code.version>

        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
        <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    </properties>

    <modules>
        <module>happy-code-base</module>
        <module>happy-code-dependencies</module>
        <module>happy-code-starters</module>
        <module>happy-code-parent</module>
        <module>happy-code-samples</module>
    </modules>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <optimize>true</optimize>
                    <compilerArgument>-parameters</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Implementation-Revision>${happy-code.version}</Implementation-Revision>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/java</directory>
                <includes>
                    <!--src/main/java目录下的xml文件也打包-->
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <resource>
                <filtering>false</filtering>
                <directory>src/test/java</directory>
                <includes>
                    <!--src/main/java目录下的xml文件也打包-->
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
    </build>
    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
    </distributionManagement>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/happy-coding-cool/happy-code</url>
        <connection>scm:git:git:////github.com/happy-coding-cool/happy-code.git</connection>
        <developerConnection>scm:git:ssh://git@//github.com/happy-coding-cool/happy-code.git</developerConnection>
    </scm>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/happy-coding-cool/happy-code/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <name>chenpengzhen</name>
            <email>happycoding@aliyun.com</email>
        </developer>
    </developers>

    <organization>
        <name>HappyCoding</name>
        <url>http://www.happycoding.cool</url>
    </organization>

</project>