<?xml version="1.0"?>
<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.redhat.lightblue.rest</groupId>
        <artifactId>lightblue-rest-pom</artifactId>
        <version>2.32.0</version>
    </parent>
    <artifactId>lightblue-rest-metadata-cert-auth</artifactId>
    <packaging>war</packaging>
    <name>lightblue-rest: ${project.groupId}|${project.artifactId}</name>
    <dependencies>
        <dependency>
            <groupId>com.redhat.lightblue.rest</groupId>
            <artifactId>lightblue-rest-metadata</artifactId>
            <version>${project.version}</version>
            <type>war</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>com.redhat.lightblue.rest</groupId>
          <artifactId>lightblue-rest-auth</artifactId>
          <version>${project.version}</version>
        </dependency>
  </dependencies>
  <build>
      <plugins>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-war-plugin</artifactId>
              <version>2.4</version>
              <configuration>
                  <overlays>
                      <overlay>
                          <groupId>com.redhat.lightblue.rest</groupId>
                          <artifactId>lightblue-rest-metadata</artifactId>
                          <excludes>
                              <exclude>WEB-INF/jboss-web.xml</exclude>
                          </excludes>
                      </overlay>
                  </overlays>
                  <webResources>
                    <resource>
                        <directory>src/main/webapp</directory>
                        <filtering>true</filtering>
                    </resource>
                  </webResources>
              </configuration>
          </plugin>
      </plugins>
  </build>
  <profiles>
      <profile>
          <id>rpm</id>
          <build>
              <plugins>
                  <!-- RPM packing -->
                  <plugin>
                      <groupId>org.codehaus.mojo</groupId>
                      <artifactId>rpm-maven-plugin</artifactId>
                      <version>2.1-alpha-3</version>
                      <extensions>true</extensions>
                      <executions>
                          <execution>
                              <goals>
                                  <goal>rpm</goal>
                              </goals>
                              <phase>verify</phase>
                          </execution>
                      </executions>
                      <configuration>
                          <name>${project.artifactId}</name>
                          <copyright>Red Hat</copyright>
                          <distribution>RHEL</distribution>
                          <group>Lightblue Platform</group>
                          <packager>${user.name}</packager>
                          <defaultFilemode>744</defaultFilemode>
                          <defaultUsername>jboss</defaultUsername>
                          <defaultGroupname>jboss</defaultGroupname>
                          <mappings>
                              <mapping>
                                  <directory>${rpm.install.basedir}</directory>
                                  <directoryIncluded>false</directoryIncluded>
                                  <sources>
                                      <source>
                                          <location>target/${project.artifactId}-${project.version}.${project.packaging}</location>
                                      </source>
                                  </sources>
                              </mapping>
                          </mappings>
                      </configuration>
                  </plugin>
              </plugins>
          </build>
      </profile>
  </profiles>
</project>