<!--
  Copyright (c) 2014 Red Hat, Inc..
  All rights reserved. This program and the accompanying materials
  are made available under the terms of the GNU Public License v3.0
  which accompanies this distribution, and is available at
  http://www.gnu.org/licenses/gpl.html
  
  Contributors:
      Red Hat, Inc. - initial API and implementation
-->
<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.commonjava.aprox</groupId>
    <artifactId>aprox-parent</artifactId>
    <version>0.18.1</version>
  </parent>
  
  <groupId>org.commonjava.aprox.embed</groupId>
  <artifactId>aprox-embedders</artifactId>
  <packaging>pom</packaging>

  <name>AProx :: Embedders :: Parent</name>
  
  <modules>
    <module>rest-min</module>
    <module>easyprox</module>
    <module>savant</module>
  </modules>
  
  <dependencies>
    <dependency>
      <groupId>org.commonjava.aprox</groupId>
      <artifactId>aprox-bindings-vertx</artifactId>
    </dependency>
    <dependency>
      <groupId>org.commonjava.aprox</groupId>
      <artifactId>aprox-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.commonjava.aprox</groupId>
      <artifactId>aprox-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.commonjava.aprox</groupId>
      <artifactId>aprox-db-flat</artifactId>
    </dependency>
    <dependency>
      <groupId>org.commonjava.aprox</groupId>
      <artifactId>aprox-filer-default</artifactId>
    </dependency>
    <dependency>
      <groupId>org.commonjava.aprox.boot</groupId>
      <artifactId>aprox-booter-vertx</artifactId>
    </dependency>
    
    <dependency>
      <groupId>args4j</groupId>
      <artifactId>args4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.weld.se</groupId>
      <artifactId>weld-se</artifactId>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-shade-plugin</artifactId>
          <executions>
            <execution>
              <id>shade-cdi-components</id>
              <goals>
                <goal>shade</goal>
              </goals>
              <phase>package</phase>
              <configuration>
                <createDependencyReducedPom>true</createDependencyReducedPom>
                <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
                <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
                <!--
                <relocations>
                  <relocation>
                    <pattern>org.commonjava.aprox</pattern>
                    <shadedPattern>org.commonjava.aprox.shaded</shadedPattern>
                  </relocation>
                </relocations>
                <transformers>
                  <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                </transformers>
                -->
                <artifactSet>
                  <includes>
                    <include>org.commonjava*:*</include>
                  </includes>
                </artifactSet>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <includeDependencySources>true</includeDependencySources>
                <dependencySourceIncludes>
                  <dependencySourceInclude>org.commonjava.aprox*</dependencySourceInclude>
                </dependencySourceIncludes>
                <detectOfflineLinks>false</detectOfflineLinks>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  
  <profiles>
    <profile>
      <id>run-its</id>

      <dependencies>
        <dependency>
          <groupId>org.commonjava.aprox</groupId>
          <artifactId>aprox-ftests-core</artifactId>
        </dependency>
        <dependency>
          <groupId>org.commonjava.aprox</groupId>
          <artifactId>aprox-test-providers-core</artifactId>
        </dependency>
      </dependencies>
      
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <dependenciesToScan>
                  <dependency>org.commonjava.aprox:aprox-ftests-core</dependency>
                </dependenciesToScan> 
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>
</project>
