<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/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>com.alibaba.rocketmq</groupId>
        <artifactId>rocketmq-all</artifactId>
        <version>3.5.2</version>
    </parent>


    <modelVersion>4.0.0</modelVersion>
    <packaging>jar</packaging>
    <artifactId>rocketmq-client</artifactId>
    <name>rocketmq-client ${project.version}</name>

    <profiles>
        <profile>
            <id>client-shade</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-shade-plugin</artifactId>
                        <version>2.4.3</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>shade</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
                            <promoteTransitiveDependencies>false</promoteTransitiveDependencies>
                            <createDependencyReducedPom>true</createDependencyReducedPom>
                            <minimizeJar>true</minimizeJar>
                            <createSourcesJar>true</createSourcesJar>
                            <artifactSet>
                                <includes>
                                    <include>com.alibaba:fastjson</include>
                                    <include>io.netty:netty-all</include>
                                    <include>com.alibaba.rocketmq:rocketmq-client</include>
                                    <include>com.alibaba.rocketmq:rocketmq-common</include>
                                    <include>com.alibaba.rocketmq:rocketmq-remoting</include>
                                </includes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <pattern>io.netty</pattern>
                                    <shadedPattern>com.alibaba.rocketmq.shade.io.netty</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>com.alibaba.fastjson</pattern>
                                    <shadedPattern>com.alibaba.rocketmq.shade.com.alibaba.fastjson</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>rocketmq-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
    </dependencies>
</project>
