<?xml version="1.0" encoding="UTF-8"?>
<!--

     Copyright 2005-2014 Red Hat, Inc.

     Red Hat licenses this file to you under the Apache License, version
     2.0 (the "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
     implied.  See the License for the specific language governing
     permissions and limitations under the License.

-->
<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>io.fabric8.insight</groupId>
        <artifactId>insight-project</artifactId>
        <version>1.1.0.CR5</version>
    </parent>

    <artifactId>insight-maven</artifactId>
    <packaging>bundle</packaging>

    <name>Fabric8 :: Insight :: Maven</name>

    <properties>
        <fuse.osgi.export>
            io.fabric8.insight.maven*;version=${project.version}
        </fuse.osgi.export>

        <!-- version info -->
        <!-- versions aligned to dependencies of Maven 3.0.5 (present in M2/lib directory) -->
        <aether-version>1.13.1</aether-version>
        <maven-aether-provider-version>3.0.5</maven-aether-provider-version>
        <plexus-container-default-version>1.5.5</plexus-container-default-version>
        <plexus-utils-version>2.0.6</plexus-utils-version>
        <wagon-version>2.4</wagon-version>
        <sisu-inject-plexus-version>2.3.0</sisu-inject-plexus-version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>

        <!-- aether -->
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-api</artifactId>
            <version>${aether-version}</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-spi</artifactId>
            <version>${aether-version}</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-util</artifactId>
            <version>${aether-version}</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-impl</artifactId>
            <version>${aether-version}</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-connector-wagon</artifactId>
            <version>${aether-version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>wagon-provider-api</artifactId>
                    <groupId>org.apache.maven.wagon</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>plexus-utils</artifactId>
                    <groupId>org.codehaus.plexus</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>sisu-inject-plexus</artifactId>
                    <groupId>org.sonatype.sisu</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.sonatype.sisu</groupId>
            <artifactId>sisu-inject-plexus</artifactId>
            <version>${sisu-inject-plexus-version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>plexus-utils</artifactId>
                    <groupId>org.codehaus.plexus</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-aether-provider</artifactId>
            <version>${maven-aether-provider-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-provider-api</artifactId>
            <version>${wagon-version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-utils</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-file</artifactId>
            <version>${wagon-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http-lightweight</artifactId>
            <version>${wagon-version}</version>
            <exclusions>
                <exclusion>
                    <groupId>nekohtml</groupId>
                    <artifactId>nekohtml</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>nekohtml</groupId>
                    <artifactId>xercesMinimal</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!--dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
            <version>${plexus-container-default-version}</version>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-classworlds</artifactId>
                </exclusion>
            </exclusions>
        </dependency-->
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>${plexus-utils-version}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-classworlds</artifactId>
            <version>2.4</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                        <!-- lets exclude the really slow unit tests for now -->
                        <!--<exclude>**/AetherTest.*</exclude>-->
                        <!--<exclude>**/AetherPomTest.*</exclude>-->
                        <!--<exclude>**/CompareTest.*</exclude>-->
                        <exclude>**/ProjectResolveTest.*</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <excludes>
                <!-- lets exclude tests that fail in the release build -->
                <exclude>**/ProjectResolveTest.*</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
