<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.bazaarvoice.emodb</groupId>
        <artifactId>emodb-parent</artifactId>
        <version>6.5.2</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>

    <artifactId>emodb-rpms</artifactId>
    <packaging>pom</packaging>

    <name>EmoDB Yum RPM Deployer</name>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>dep.xml</descriptor>
                    </descriptors>
                    <tarLongFileMode>posix</tarLongFileMode>
                    <finalName>emodb-${project.version}</finalName>
                </configuration>
                <executions>
                    <execution>
                        <id>create-package</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>yum-deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.bazaarvoice.maven.plugins</groupId>
                        <artifactId>s3repo-maven-plugin</artifactId>
                        <version>3.6</version>
                        <executions>
                            <execution>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>create-update</goal>
                                </goals>
                                <configuration>
                                    <s3RepositoryPath>${yumrepo.s3RepositoryPath}</s3RepositoryPath>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>${project.groupId}</groupId>
                                            <artifactId>${yumArtifactId}</artifactId>
                                            <version>${project.version}</version>
                                            <type>rpm</type>
                                            <targetBaseName>${yumArtifactName}</targetBaseName>
                                            <targetExtension>noarch.rpm</targetExtension>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
