<?xml version="1.0" encoding="UTF-8"?>
<!--

  ~ Copyright (C) 2020-2022 Huawei Technologies Co., Ltd. All rights reserved.

  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://maven.apache.org/POM/4.0.0"
  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>

  <parent>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-build</artifactId>
    <!-- This version should match spring-cloud-dependencies 'spring-cloud-build.version' -->
    <version>2.3.1.RELEASE</version>
  </parent>

  <groupId>com.huaweicloud</groupId>
  <artifactId>spring-cloud-huawei</artifactId>
  <version>1.9.0-Hoxton</version>
  <packaging>pom</packaging>
  <name>Spring Cloud Huawei</name>

  <properties>
    <java.version>1.8</java.version>
    <!-- spring-cloud-dependencies do not import spring-boot-dependencies, spring-boot-dependencies
     import spring-framework-bom. No need configure spring version. -->
    <spring-cloud.version>Hoxton.SR9</spring-cloud.version>
    <spring-boot.version>2.3.5.RELEASE</spring-boot.version>
    <servicecomb.version>2.7.0</servicecomb.version>
  </properties>

  <modules>
    <module>spring-cloud-huawei-dependencies</module>
    <module>spring-cloud-huawei-bom</module>
    <module>spring-cloud-huawei-parents</module>
    <module>spring-cloud-huawei-common</module>
    <module>spring-cloud-huawei-discovery</module>
    <module>spring-cloud-starter-huawei</module>
    <module>spring-cloud-huawei-config</module>
    <module>spring-cloud-huawei-router-client</module>
    <module>spring-cloud-huawei-swagger</module>
    <module>spring-cloud-huawei-governance</module>
  </modules>

  <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/huaweicloud/spring-cloud-huawei</url>
    <connection>scm:git:git://github.com/huaweicloud/spring-cloud-huawei.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/huaweicloud/spring-cloud-huawei.git
    </developerConnection>
    <tag>HEAD</tag>
  </scm>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <snapshotRepository>
          <id>oss</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
          <id>oss</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
    </profile>
    <profile>
      <id>it</id>
      <modules>
        <module>integration-tests</module>
        <module>coverage-reports</module>
      </modules>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.13</version>
        <configuration>
          <excludes>
            <exclude>DISCLAIMER</exclude>
            <exclude>.travis.yml</exclude>
            <exclude>**/cert_pwd</exclude>
            <exclude>**/*.cer</exclude>
            <exclude>**/*.md</exclude>
            <excldue>**/*.MD</excldue>
            <excldue>**/*.iml</excldue>
            <excldue>.github/**</excldue>
            <!-- Skip the code style configuration file -->
            <exclude>**/etc/eclipse-java-google-style.xml</exclude>
            <exclude>**/etc/intellij-java-google-style.xml</exclude>
            <!-- Skip the ssl configuration files -->
            <exculde>**/resources/ssl/**</exculde>
            <!-- SKip the licenses files -->
            <exclude>**/src/release/licenses/**</exclude>
            <!-- Skip the demo log files -->
            <exclude>**/logs/**.log</exclude>
            <exclude>**/**.log</exclude>
            <!-- Skip the target files -->
            <exclude>**/target/**</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>