<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2015 Red Hat, Inc. and/or its affiliates.
  ~
  ~ Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
  -->
<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.wildfly.swarm</groupId>
    <artifactId>parent</artifactId>
    <version>7</version>
    <relativePath />
  </parent>

  <groupId>org.wildfly.swarm</groupId>
  <artifactId>swagger-parent</artifactId>
  <version>1.0.0.Final</version>

  <name>WildFly Swarm: Swagger</name>
  <description>WildFly Swarm: Swagger</description>

  <packaging>pom</packaging>

  <scm>
    <connection>scm:git:git@github.com:wildfly-swarm/wildfly-swarm-swagger.git</connection>
    <developerConnection>scm:git:git@github.com:wildfly-swarm/wildfly-swarm-swagger.git</developerConnection>
    <url>https://github.com/wildfly-swarm/wildfly-swarm-swagger</url>
    <tag>1.0.0.Final</tag>
  </scm>

  <properties>
    <version.swarm.spi>1.0.3.Final</version.swarm.spi>
    <version.swarm.core>1.0.0.Final</version.swarm.core>
    <version.swarm.fraction-plugin>19</version.swarm.fraction-plugin>

    <version.io.swagger>1.5.5</version.io.swagger>
    <version.reflections>0.9.10</version.reflections>
    <version.slf4j>1.6.3</version.slf4j>
    <version.guava>18.0</version.guava>
    <version.javassist>3.18.2-GA</version.javassist>
    <version.commons.lang>3.2.1</version.commons.lang>
    <version.jackson>2.4.5</version.jackson>

    <version.fest-assert>1.4</version.fest-assert>
  </properties>

  <repositories>
    <repository>
      <id>projectodd-snapshots</id>
      <name>Project:odd Snapshots from CI</name>
      <url>https://repository-projectodd.forge.cloudbees.com/snapshot</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.wildfly.swarm</groupId>
          <artifactId>wildfly-swarm-fraction-plugin</artifactId>
          <version>${version.swarm.fraction-plugin}</version>
          <executions>
            <execution>
              <phase>process-classes</phase>
              <goals>
                <goal>process</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <reuseForks>false</reuseForks>
          <runOrder>alphabetical</runOrder>
          <failIfNoTests>false</failIfNoTests>
          <systemPropertyVariables>
            <swarm.bind.address>127.0.0.1</swarm.bind.address>
            <project.version>${project.version}</project.version>
          </systemPropertyVariables>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>spi</artifactId>
        <version>${version.swarm.spi}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>swagger</artifactId>
        <version>1.0.0.Final</version>
      </dependency>
      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>swagger-api</artifactId>
        <version>1.0.0.Final</version>
      </dependency>
      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>swagger-modules</artifactId>
        <version>1.0.0.Final</version>
      </dependency>
      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>swagger-runtime</artifactId>
        <version>1.0.0.Final</version>
      </dependency>

      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>swagger-webapp</artifactId>
        <version>1.0.0.Final</version>
      </dependency>
      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>swagger-webapp-api</artifactId>
        <version>1.0.0.Final</version>
      </dependency>
      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>swagger-webapp-modules</artifactId>
        <version>1.0.0.Final</version>
      </dependency>
      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>swagger-webapp-runtime</artifactId>
        <version>1.0.0.Final</version>
      </dependency>

      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>swagger-webapp-ui</artifactId>
        <type>war</type>
        <version>1.0.0.Final</version>
      </dependency>

      <dependency>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-jaxrs</artifactId>
        <version>${version.io.swagger}</version>
      </dependency>
      <dependency>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-core</artifactId>
        <version>${version.io.swagger}</version>
      </dependency>
      <dependency>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-models</artifactId>
        <version>${version.io.swagger}</version>
      </dependency>
      <dependency>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-annotations</artifactId>
        <version>${version.io.swagger}</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${version.guava}</version>
      </dependency>
      <dependency>
        <groupId>org.reflections</groupId>
        <artifactId>reflections</artifactId>
        <version>${version.reflections}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${version.slf4j}</version>
      </dependency>
      <dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>${version.javassist}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${version.commons.lang}</version>
      </dependency>

      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>bean-validation</artifactId>
        <version>${version.swarm.core}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>jaxrs</artifactId>
        <version>${version.swarm.core}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>msc</artifactId>
        <version>${version.swarm.core}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>undertow</artifactId>
        <version>${version.swarm.core}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-aether-provider</artifactId>
        <version>3.2.5</version>
      </dependency>

      <dependency>
        <groupId>org.easytesting</groupId>
        <artifactId>fest-assert</artifactId>
        <version>${version.fest-assert}</version>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easytesting</groupId>
      <artifactId>fest-assert</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <modules>
    <module>adapter</module>
    <module>webapp</module>
  </modules>

  <profiles>
    <profile>
      <id>attach-exposed-components</id>
      <activation>
        <file>
          <exists>exposed-components.json</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>add-exposed-components</id>
                <phase>process-resources</phase>
                <goals>
                  <goal>attach-artifact</goal>
                </goals>
                <configuration>
                  <artifacts>
                    <artifact>
                      <file>exposed-components.json</file>
                      <type>json</type>
                      <classifier>exposed-components</classifier>
                    </artifact>
                  </artifacts>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
