<?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>org.openeuler</groupId>
    <artifactId>gmssl</artifactId>
    <packaging>pom</packaging>
    <version>1.1.4</version>
    <modules>
        <module>jca</module>
        <module>jsse</module>
        <module>bgmprovider</module>
        <module>tomcat-adaptor</module>
        <module>thirdparty-testing</module>
        <module>commons</module>
    </modules>

    <name>gmssl</name>
    <url>https://gitee.com/openeuler/bgmprovider</url>
    <description>Java Support for GMTLS</description>

    <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>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.openeuler</groupId>
                <artifactId>jca</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openeuler</groupId>
                <artifactId>jsse</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openeuler</groupId>
                <artifactId>commons</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>1.78.1</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
            <plugins>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.1</version>
                    <configuration>
                        <forkCount>0.5C</forkCount>
                        <parallel>none</parallel>
                        <reuseForks>false</reuseForks>
                        <forkedProcessTimeoutInSeconds>90</forkedProcessTimeoutInSeconds>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <goal>aggregate</goal>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.7.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                    <configuration>
                        <includePom>true</includePom>
                        <excludeResources>true</excludeResources>
                        <attach>true</attach>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>package</phase>
                            <goals>
                                <!-- packaging source code of the project in jar file -->
                                <!--                                <goal>jar</goal>-->
                                <!--                                package source code in jar e.g. mvn source:jar -->
                                <!--                                to package all the source codes of the modules in the-->
                                <!--                                the aggregated project,please execute the following command-->
                                <!--                                in the root directory of the project-->
                                <!--                                mvn source:aggregate-->
                                <goal>aggregate</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!--                version modification plugins-->
                <!--                the following maven commands should be executed in the root directory of the project-->
                <!--                1)set version: mvn versions:set -DnewVersion=XXX-->
                <!--                2)revert version: mvn versions:revert-->
                <!--                3)commit version: mvn versions:commit-->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <licenses>
        <license>
            <name>GPLv2 with Classpath Exception</name>
            <url>https://openjdk.java.net/legal/gplv2+ce.html</url>
        </license>
    </licenses>
    <scm>
        <connection>https://gitee.com/openeuler/bgmprovider.git</connection>
        <url>https://gitee.com/openeuler/bgmprovider</url>
    </scm>
    <developers>
        <developer>
            <name>BGMProvider</name>
            <email>bgmprovider@163.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
    </developers>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Java source -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>verify</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>
                            <javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
                        </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.6</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <name>Sonatype Nexus Snapshots</name>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>sonatype-nexus-staging</id>
                    <name>Nexus Release Repository</name>
                    <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>
</project>
