<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>example</groupId>
  <artifactId>fc-java-parent</artifactId>
  <packaging>pom</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>FC Java Parent</name>

  <modules>
    <!-- 共享API -->
    <module>yyc-fc-api</module>

    <!-- 阿里云示例 -->
    <module>java11-blank-stream-event</module>
    <module>java11-blank-pojo-event</module>
    <module>java11-blank-http</module>
    <module>java11-mongodb</module>
    <module>java11-mysql</module>
    <module>java11-oss</module>
    <module>java11-full-timer-trigger-java/src/code</module>
    <module>java11-full-rds-mysql-http-java11/src/code</module>
    <module>java11-full-rabbit-trigger-springboot/src/code</module>
    <module>java11-full-oss-trigger-java/src/code</module>
    <module>java11-full-mongodb-java/src/code</module>
    <module>java11-full-rds-mysql-java11/src/code</module>
    <module>java11-full-mongodb-java-http/src/code</module>

    <!-- YYC的框架云函数 -->
    <module>read-oss-test-data</module>
    <module>mimic-real-msg</module>
    <module>pre-process</module>
    <module>result-verify</module>
    <module>email-notify</module>

    <!-- YYC的算法测试云函数-->
    <module>fake-feature-extract</module>
    <module>image-dup-check-feature-extract</module>

    <module>fake-result-generate</module>
    <module>image-dup-check-result-generate</module>
  </modules>

  <properties>
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.test.skip>true</maven.test.skip>
    <checkstyle.skip>true</checkstyle.skip>
    <spring.checkstyle.version>0.0.26</spring.checkstyle.version>
  </properties>

  <profiles>
    <profile>
      <id>dev</id>
      <properties>
        <test.channel>dev</test.channel>
      </properties>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    </profile>
    <profile>
      <id>channel1</id>
      <properties>
        <test.channel>channel1</test.channel>
      </properties>
    </profile>
    <profile>
      <id>channel2</id>
      <properties>
        <test.channel>channel2</test.channel>
      </properties>
    </profile>
  </profiles>

  <!-- <repositories>
    <repository>
      <id>central</id>
      <url>https://repo1.maven.org/maven2</url>
    </repository>
    <repository>
      <id>yaoyi</id>
      <url>https://artifact.yaoyi.net/repository/maven-public</url>
    </repository>
  </repositories>
 -->
  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.6.0</version>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>9.3</version>
          </dependency>
        </dependencies>
        <configuration>
          <outputEncoding>UTF-8</outputEncoding>
          <skip>${checkstyle.skip}</skip>
          <configLocation>.style/alibaba.xml</configLocation>
          <consoleOutput>true</consoleOutput>
          <failsOnError>false</failsOnError>
          <linkXRef>false</linkXRef>
          <includeTestSourceDirectory>false</includeTestSourceDirectory>
          <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
        </configuration>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!--代码格式插件，默认使用spring 规则-->
      <plugin>
        <groupId>io.spring.javaformat</groupId>
        <artifactId>spring-javaformat-maven-plugin</artifactId>
        <version>${spring.checkstyle.version}</version>
        <!-- <executions>
          <execution>
            <id>format</id>
            <phase>process-sources</phase>
            <goals>
              <goal>apply</goal>
            </goals>
          </execution>
        </executions> -->
      </plugin>
    </plugins>
  </build>
</project>