<?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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.xipki.assembly</groupId>
    <artifactId>assemblies</artifactId>
    <version>5.3.14</version>
  </parent>
  <groupId>org.xipki.feature</groupId>
  <artifactId>features</artifactId>
  <name>XiPKI :: ${project.artifactId}</name>
  <packaging>pom</packaging>
  <modules>
    <module>cli</module>
    <module>qa</module>
  </modules>
  <profiles>
    <profile>
      <id>features</id>
      <activation>
        <file>
          <exists>src/main/filtered/features.xml</exists>
        </file>
      </activation>
      <build>
        <resources>
          <resource>
            <directory>src/main/filtered</directory>
            <filtering>true</filtering>
          </resource>
        </resources>
        <plugins>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <executions>
              <execution>
                <id>filter</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>resources</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-artifacts</id>
                <phase>package</phase>
                <goals>
                  <goal>attach-artifact</goal>
                </goals>
                <configuration>
                  <artifacts>
                    <artifact>
                      <file>target/classes/features.xml</file>
                      <type>xml</type>
                      <classifier>features</classifier>
                    </artifact>
                  </artifacts>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
