<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>org.overlord.apiman</groupId>
    <artifactId>apiman-distro</artifactId>
    <version>1.0.0.Alpha4</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>apiman-distro-fuse6-dt</artifactId>
  <packaging>pom</packaging>
  <name>apiman-distro-fuse6-dt</name>

  <dependencies>
    <!-- APIMan Modules -->
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-common-auth</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-dt-api-beans</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-dt-api-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-dt-api-gateway</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-dt-api-gateway-rest</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>httpclient</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
        <exclusion>
          <artifactId>httpcore</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-dt-api-jpa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-dt-api-jpa-idm</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-dt-api-rest</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-dt-api-rest-impl</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-dt-api-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-dt-api-war-fuse6</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.apiman</groupId>
      <artifactId>apiman-dt-ui-war-fuse6</artifactId>
      <type>war</type>
    </dependency>

    <!-- Overlord Commons -->
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-gwt</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-i18n</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-services</artifactId>
    </dependency>

    <!-- Required Spec Libs -->
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jta_1.1_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hibernate.javax.persistence</groupId>
      <artifactId>hibernate-jpa-2.0-api</artifactId>
    </dependency>
    
    <!-- HTTP Components -->
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient-osgi</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>httpclient</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
        <exclusion>
          <artifactId>httpclient-cache</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
        <exclusion>
          <artifactId>fluent-hc</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
        <exclusion>
          <artifactId>httpcore</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
        <exclusion>
          <artifactId>httpmime</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore-osgi</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>httpcore</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
        <exclusion>
          <artifactId>httpcore-nio</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Hibernate -->
    <dependency>
      <groupId>org.hibernate.common</groupId>
      <artifactId>hibernate-commons-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>antlr</artifactId>
          <groupId>antlr</groupId>
        </exclusion>
        <exclusion>
          <artifactId>dom4j</artifactId>
          <groupId>dom4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>dom4j</artifactId>
          <groupId>dom4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-osgi</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>org.osgi.core</artifactId>
          <groupId>org.osgi</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Other Required Libs -->
    <dependency>
      <groupId>com.fasterxml</groupId>
      <artifactId>classmate</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jandex</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-jaxrs</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.servicemix.bundles</groupId>
      <artifactId>org.apache.servicemix.bundles.antlr</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.servicemix.bundles</groupId>
      <artifactId>org.apache.servicemix.bundles.dom4j</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>xml-apis</artifactId>
          <groupId>xml-apis</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Database Libs -->
    <dependency>
      <groupId>commons-pool</groupId>
      <artifactId>commons-pool</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <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>${basedir}/src/main/resources/apiman-dt.cfg</file>
                  <type>cfg</type>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <!-- Disable this check -->
          <execution>
            <id>enforce-plugin-versions</id>
            <phase>non-existant</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.overlord</groupId>
        <artifactId>overlord-commons-maven-plugin</artifactId>
        <version>${version.org.overlord.overlord-commons.overlord-commons-maven-plugin}</version>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>generate-features-xml</goal>
            </goals>
            <configuration>
              <outputFile>${project.build.directory}/features.xml</outputFile>
              <attach>true</attach>
              <features>
                <!-- All APIMan Dependencies -->
                <feature>
                  <name>apiman-dependencies</name>
                  <version>${project.version}</version>
                  <comment>All API Management Dependencies</comment>
                  <dependsOnFeatures>
                    <feature>
                      <name>war</name>
                    </feature>
                  </dependsOnFeatures>
                  <excludes>
                    <exclude>org.overlord.apiman:apiman-*:*</exclude>
                  </excludes>
                </feature>
                <!-- APIMan Management Layer -->
                <feature>
                  <name>apiman-dt</name>
                  <version>${project.version}</version>
                  <comment>API Management Runtime</comment>
                  <dependsOnFeatures>
                    <feature>
                      <name>war</name>
                    </feature>
                    <feature>
                      <name>cxf</name>
                    </feature>
                    <feature>
                      <name>apiman-dependencies</name>
                      <version>${project.version}</version>
                    </feature>
                  </dependsOnFeatures>
                  <configFiles>
                    <configFile>
                      <finalName>/etc/apiman-dt.cfg</finalName>
                      <value>mvn:org.overlord.apiman/apiman-distro-fuse6-dt/${project.version}/cfg</value>
                    </configFile>
                  </configFiles>
                  <includes>
                    <include>org.overlord.apiman:apiman-*:*</include>
                  </includes>
                </feature>
              </features>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>