<?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>jolokia-parent</artifactId>
  <version>1.0.2.Final</version>

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

  <packaging>pom</packaging>

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

  <properties>
    <version.jolokia>1.3.1</version.jolokia>
    <version.swarm.core>1.0.0.Final</version.swarm.core>
    <version.swarm.spi>1.0.3.Final</version.swarm.spi>
    <version.swarm.fraction-plugin>20</version.swarm.fraction-plugin>
  </properties>

  <build>
    <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>
  </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>jolokia</artifactId>
        <version>1.0.2.Final</version>
      </dependency>
      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>jolokia-api</artifactId>
        <version>1.0.2.Final</version>
      </dependency>
      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>jolokia-modules</artifactId>
        <version>1.0.2.Final</version>
      </dependency>
      <dependency>
        <groupId>org.wildfly.swarm</groupId>
        <artifactId>jolokia-runtime</artifactId>
        <version>1.0.2.Final</version>
      </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.jolokia</groupId>
        <artifactId>jolokia-war</artifactId>
        <type>war</type>
        <version>${version.jolokia}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <modules>
    <module>jolokia</module>

    <module>api</module>
    <module>runtime</module>
    <module>modules</module>
    <module>test</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>
