<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.bug</groupId>
  <artifactId>karaf-tooling-bug</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>
  <name>Demonstrate validation bug</name>

  <properties>
    <karaf.version>4.0.0.M1</karaf.version>
  </properties>

  <dependencies>
    <!-- If this isn't present then aries-proxy has unresolved imports 
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.framework</artifactId>
      <version>4.4.1</version>
      <scope>provided</scope>
    </dependency>
    -->
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>karaf-maven-plugin</artifactId>
        <version>${karaf.version}</version>
        <executions>
          <execution>
            <id>compile</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>features-generate-descriptor</goal>
            </goals>
            <configuration>
              <addBundlesToPrimaryFeature>false</addBundlesToPrimaryFeature>
            </configuration>
          </execution>
          <execution>
            <id>validate</id>
            <phase>process-resources</phase>
            <goals>
              <goal>features-validate-descriptor</goal>
            </goals>
            <configuration>
              <file>target/feature/feature.xml</file>
              <!-- If this isn't present then the dependencies on pax-http can't be result from the standard feature
              <repositories>
                <repository>mvn:org.ops4j.pax.web/pax-web-features/4.0.0/xml/features</repository>
              </repositories> -->
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>