<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>woody</artifactId>
        <groupId>dev.vality.woody</groupId>
        <version>2.0.2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>woody-thrift</artifactId>

    <properties>
        <checkstyle.config.suppressions.path>checkstyle-suppressions.xml</checkstyle.config.suppressions.path>
    </properties>

    <dependencies>
        <!--Vality libs-->
        <dependency>
            <groupId>dev.vality.woody</groupId>
            <artifactId>woody-api</artifactId>
        </dependency>
        <dependency>
            <groupId>dev.vality.woody</groupId>
            <artifactId>libthrift</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!--Thirdparty libs-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <version>5.0.0</version>
            <scope>provided</scope>
        </dependency>
        <!--Test libs-->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-quickstart</artifactId>
            <version>11.0.16</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.36</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>4.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>gen_thrift_classes</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.thrift</groupId>
                        <artifactId>thrift-maven-plugin</artifactId>
                        <version>0.10.0</version>
                        <configuration>
                            <thriftExecutable>thrift</thriftExecutable>
                        </configuration>
                        <executions>
                            <execution>
                                <id>thrift-sources</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>thrift-test-sources</id>
                                <phase>generate-test-sources</phase>
                                <goals>
                                    <goal>testCompile</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
