<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>io.github.ztnozdormu</groupId>
    <artifactId>northstar-w3-exchange</artifactId>
    <version>0.0.2</version>
    <name>northstar-w3-exchange</name>
    <packaging>pom</packaging>
    <url>https://github.com/ztNozdormu/northstar-w3-exchange</url>
    <description>
        northstar-w3-exchange
    </description>

    <properties>
        <w3.exchange.version>0.0.2</w3.exchange.version>
        <java.version>11</java.version>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.plugin.version>3.8.1</maven.plugin.version>
        <spring.plugin.version>2.0.0.RELEASE</spring.plugin.version>
        <spring.boot.version>2.7.8</spring.boot.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
        <okhttp.version>4.9.2</okhttp.version>
        <okhttp.mockwebserver>4.9.1</okhttp.mockwebserver>
        <commons.codec.version>1.15</commons.codec.version>
    </properties>

    <modules>
        <module>w3-common</module>
        <module>w3-cex</module>
        <module>w3-third-quotation</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.plugin</groupId>
                <artifactId>spring-plugin-core</artifactId>
                <version>${spring.plugin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.plugin</groupId>
                <artifactId>spring-plugin-metadata</artifactId>
                <version>${spring.plugin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring.boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!-- developers -->
    <developers>
        <developer>
            <name>ztNozdormu</name>
            <email>w1999wtw3537@sina.com</email>
            <timezone>+8</timezone>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>
    <!-- license -->
    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>https://github.com/ztNozdormu/northstar-w3-exchange/blob/main/LICENSE</url>
        </license>
    </licenses>

    <!-- scm -->
    <scm>
        <connection>scm:git:git@github.com:ztNozdormu/northstar-w3-exchange.git</connection>
        <developerConnection>scm:git:git@github.com:ztNozdormu/northstar-w3-exchange.git</developerConnection>
        <url>git@github.com:ztNozdormu/northstar-w3-exchange.git</url>
    </scm>

    <!-- issue -->
    <issueManagement>
        <system>Github Issue</system>
        <url>https://github.com/ztNozdormu/northstar-w3-exchange/issues</url>
    </issueManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>oss</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>oss</id>
            <url>https://s01.oss.sonatype.orgservice/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <finalName>${project.name}-${project.version}</finalName>
                <resources>
                    <resource>
                        <directory>src/main/resources</directory>
                    </resource>
                    <resource>
                        <directory>src/main/java</directory>
                        <includes>
                            <include>**/*.xml</include>
                        </includes>
                    </resource>
                </resources>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>${maven.plugin.version}</version>
                        <configuration>
                            <source>${java.version}</source>
                            <target>${java.version}</target>
                            <encoding>UTF-8</encoding>
                            <compilerArgs>
                                <arg>-parameters</arg>
                            </compilerArgs>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                    <!-- 要生成Javadoc和Source jar文件，您必须配置javadoc和源Maven插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <executions>
                            <execution>
                                <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-surefire-plugin</artifactId>
                        <version>2.18.1</version>
                        <configuration>
                            <skipTests>true</skipTests>
                        </configuration>
                    </plugin>
                    <!-- Source -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>oss</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Gpg Signature -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>oss</id>
                                <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>oss</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <!--    maven私服仓库地址-->
<!--    <distributionManagement>-->
<!--        <repository>-->
<!--            <id>maven-releases</id>-->
<!--            <name>maven-releases</name>-->
<!--            <url>http://192.168.1.100:8081/repository/maven-releases/</url>-->
<!--        </repository>-->
<!--    </distributionManagement>-->

</project>
