<?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>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>3.5.9</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>com.codingapi.flow</groupId>
	<artifactId>flow-engine-parent</artifactId>
	<version>0.0.37</version>
    <packaging>pom</packaging>

    <url>https://github.com/codingapi/flow-engine</url>
	<name>flow-engine-parent</name>
	<description>FlowEngine project for Spring Boot</description>


    <properties>
        <!-- maven properties-->
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
        <maven.compile.source>17</maven.compile.source>
        <maven.compile.target>17</maven.compile.target>
        <maven.source.plugin>3.0.1</maven.source.plugin>
        <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>

		<java.version>17</java.version>
        <fastjson.version>2.0.53</fastjson.version>
        <jsonwebtoken.jjwt.version>0.12.6</jsonwebtoken.jjwt.version>
        <commons-io.version>2.17.0</commons-io.version>
        <commons-lang3.version>3.20.0</commons-lang3.version>
        <commons-crypto.version>1.2.0</commons-crypto.version>
        <codingapi.framework.version>3.4.43</codingapi.framework.version>
	</properties>

	<dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.codingapi.springboot</groupId>
            <artifactId>springboot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
	</dependencies>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>com.codingapi.flow</groupId>
                <artifactId>flow-engine-framework</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.codingapi.flow</groupId>
                <artifactId>flow-engine-starter</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.codingapi.flow</groupId>
                <artifactId>flow-engine-starter-infra</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.codingapi.flow</groupId>
                <artifactId>flow-engine-starter-api</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.codingapi.flow</groupId>
                <artifactId>flow-engine-starter-query</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang3.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-crypto</artifactId>
                <version>${commons-crypto.version}</version>
            </dependency>

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>

            <dependency>
                <groupId>com.codingapi.springboot</groupId>
                <artifactId>springboot-starter</artifactId>
                <version>${codingapi.framework.version}</version>
            </dependency>

            <dependency>
                <groupId>com.codingapi.springboot</groupId>
                <artifactId>springboot-starter-security</artifactId>
                <version>${codingapi.framework.version}</version>
            </dependency>

            <dependency>
                <groupId>com.codingapi.springboot</groupId>
                <artifactId>springboot-starter-data-fast</artifactId>
                <version>${codingapi.framework.version}</version>
            </dependency>


            <dependency>
                <groupId>io.jsonwebtoken</groupId>
                <artifactId>jjwt-api</artifactId>
                <version>${jsonwebtoken.jjwt.version}</version>
            </dependency>

            <dependency>
                <groupId>io.jsonwebtoken</groupId>
                <artifactId>jjwt-impl</artifactId>
                <version>${jsonwebtoken.jjwt.version}</version>
            </dependency>

            <dependency>
                <groupId>io.jsonwebtoken</groupId>
                <artifactId>jjwt-jackson</artifactId>
                <version>${jsonwebtoken.jjwt.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <scm>
        <connection>scm:git:https://github.com/codingapi/flow-engine.git</connection>
        <developerConnection>scm:git:https://github.com/codingapi/flow-engine.git</developerConnection>
        <url>https://github.com/codingapi/flow-engine</url>
        <tag>v${project.version}</tag>
    </scm>

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

    <developers>
        <developer>
            <name>lorne</name>
            <email>wangliang@codingapi.com</email>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${maven.compile.source}</source>
                    <target>${maven.compile.target}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <compilerArgument>-Xlint:deprecation</compilerArgument>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Implementation-Version>${project.version}</Implementation-Version>
                            <Implementation-Title>${project.name}</Implementation-Title>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>


    <profiles>
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>flow-engine-starter</module>
                <module>flow-engine-starter-infra</module>
                <module>flow-engine-example</module>
                <module>flow-engine-framework</module>
                <module>flow-engine-starter-api</module>
                <module>flow-engine-starter-query</module>
            </modules>
        </profile>
        <!-- mvn clean test -P travis-->
        <profile>
            <id>travis</id>

            <modules>
                <module>flow-engine-starter</module>
                <module>flow-engine-starter-infra</module>
                <module>flow-engine-framework</module>
                <module>flow-engine-starter-api</module>
                <module>flow-engine-starter-query</module>
            </modules>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.8.12</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.openclover</groupId>
                        <artifactId>clover-maven-plugin</artifactId>
                        <version>4.5.2</version>
                        <configuration>
                            <generateHtml>true</generateHtml>
                            <generateXml>true</generateXml>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>

        <profile>
            <!-- mvn clean deploy -P ossrh  -->
            <!-- mvn clean deploy -P ossrh -Dgpg.passphrase="你的GPG密码" -->
            <!-- gpg: signing failed: Inappropriate ioctl for device -->
            <!-- fix command : export GPG_TTY=$(tty)  -->
            <!-- https://github.com/keybase/keybase-issues/issues/2798 -->
            <id>ossrh</id>

            <modules>
                <module>flow-engine-starter</module>
                <module>flow-engine-starter-infra</module>
                <module>flow-engine-framework</module>
                <module>flow-engine-starter-api</module>
                <module>flow-engine-starter-query</module>
            </modules>


            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.8.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                            <waitUntil>published</waitUntil>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <additionalOptions>
                                <additionalOption>-Xdoclint:none</additionalOption>
                            </additionalOptions>
                        </configuration>
                    </plugin>


                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>

</project>
