<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>library-parent-pom</artifactId>
    <groupId>dev.vality</groupId>
    <version>1.0.2</version>
    <relativePath>../pom.xml/pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>msgpack-proto</artifactId>
  <name>Msgpack</name>
  <version>${revision}</version>
  <description>Generates jar artifact containing compiled thrift classes based on generated thrift IDL files</description>
  <url>https://github.com/valitydev/msgpack-proto.git</url>
  <developers>
    <developer>
      <email>devs@vality.dev</email>
      <organization>Vality</organization>
      <organizationUrl>https://vality.dev</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/valitydev/msgpack-proto.git</connection>
    <developerConnection>scm:git:ssh://github.com/valitydev/msgpack-proto.git</developerConnection>
    <url>https://github.com/valitydev/msgpack-proto/tree/master</url>
  </scm>
  <build>
    <resources>
      <resource>
        <targetPath>${project.build.outputDirectory}/proto</targetPath>
        <directory>${project.basedir}/proto</directory>
        <includes>
          <include>*.thrift</include>
        </includes>
      </resource>
    </resources>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <groupId>org.apache.thrift</groupId>
        <artifactId>thrift-maven-plugin</artifactId>
        <version>0.10.0</version>
        <executions>
          <execution>
            <id>thrift-sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <generator>java:fullcamel</generator>
          <thriftSourceRoot>${project.basedir}/proto</thriftSourceRoot>
          <thriftExecutable>${path_to_thrift}</thriftExecutable>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.3.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <relocations>
                <relocation>
                  <pattern>dev.vality.msgpack</pattern>
                  <shadedPattern>dev.vality.msgpack.v${commit.number}</shadedPattern>
                </relocation>
              </relocations>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>v${commit.number}</shadedClassifierName>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>dev.vality.woody</groupId>
      <artifactId>woody-thrift</artifactId>
      <version>1.0.4</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <revision>SNAPSHOT</revision>
  </properties>
</project>
