<?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>io.thorntail</groupId>
    <artifactId>build-parent</artifactId>
    <version>2.5.1.Final-redhat-00010</version>
    <relativePath>../../build-parent/pom.xml</relativePath>
  </parent>

  <artifactId>container</artifactId>

  <name>Container</name>
  <description>Container</description>

  <packaging>jar</packaging>

  <properties>
    <swarm.fraction.internal>true</swarm.fraction.internal>
    <swarm.fraction.stability>stable</swarm.fraction.stability>
  </properties>

   <build>
      <resources>
         <resource>
            <directory>${project.basedir}/src/main/resources</directory>
            <filtering>true</filtering>
         </resource>
      </resources>
      <plugins>
         <!-- Used to verify the Weld version used for weld-se-core is the
            same as the version provided by WildFly feature pack -->
         <plugin>
            <groupId>io.reformanda.semper</groupId>
            <artifactId>dependencyversion-maven-plugin</artifactId>
            <version>${version.dependencyversion-maven-plugin}</version>
            <executions>
               <execution>
                  <id>set-versions</id>
                  <goals>
                     <goal>set-version</goal>
                  </goals>
               </execution>
            </executions>
            <configuration>
               <propertySets>
                  <propertySet>
                     <includes>
                        <include>org.jboss.weld:weld-core-impl:jar</include>
                        <include>org.jboss.weld:weld-api:jar</include>
                     </includes>
                  </propertySet>
               </propertySets>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
               <execution>
                  <id>verify-weld-version</id>
                  <phase>package</phase>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <configuration>
                     <target>
                        <fail message="Weld SE version ${version.weld-se} does not align with version provided by the WildFly feature pack!">
                           <condition>
                              <not>
                                 <equals arg1="${version.weld-se}" arg2="${org.jboss.weld:weld-core-impl:jar.version}"></equals>
                              </not>
                           </condition>
                        </fail>
                     </target>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

  <dependencies>
    <!-- not used, only to make PME align version.weld-api-->
    <dependency>
      <groupId>org.jboss.weld</groupId>
      <artifactId>weld-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.thorntail</groupId>
      <artifactId>spi</artifactId>
    </dependency>
    <dependency>
      <groupId>io.thorntail</groupId>
      <artifactId>bootstrap</artifactId>
    </dependency>
    <dependency>
      <groupId>io.thorntail</groupId>
      <artifactId>config-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>io.thorntail.jdk-specific</groupId>
      <artifactId>thorntail-jdk-specific</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging-annotations</artifactId>
      <!-- This is a compile-time dependency of this project, but is not needed at compile or runtime by other
            projects that depend on this project.-->
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging-processor</artifactId>
      <!-- This is a compile-time dependency of this project, but is not needed at compile or runtime by other
            projects that depend on this project.-->
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>javax.enterprise</groupId>
      <artifactId>cdi-api</artifactId>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>javax.el</groupId>
          <artifactId>javax.el-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.interceptor</groupId>
          <artifactId>javax.interceptor-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.weld.se</groupId>
      <artifactId>weld-se-core</artifactId>
      <version>${version.weld-se}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.wildfly.core</groupId>
      <artifactId>wildfly-server</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.wildfly.core</groupId>
      <artifactId>wildfly-deployment-repository</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.eap</groupId>
      <artifactId>wildfly-naming</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.wildfly.core</groupId>
      <artifactId>wildfly-logging</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.wildfly.core</groupId>
      <artifactId>wildfly-controller</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.wildfly.core</groupId>
      <artifactId>wildfly-core-feature-pack</artifactId>
      <type>zip</type>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.eap</groupId>
      <artifactId>wildfly-feature-pack</artifactId>
      <type>zip</type>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.eap</groupId>
      <artifactId>wildfly-servlet-feature-pack</artifactId>
      <type>zip</type>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.el</groupId>
      <artifactId>jboss-el-api_3.0_spec</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>
