<?xml version='1.0' encoding='UTF-8'?>
<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.escalante</groupId>
      <artifactId>escalante</artifactId>
      <version>0.2.0</version>
      <relativePath>../pom.xml</relativePath>
   </parent>

   <groupId>io.escalante</groupId>
   <artifactId>escalante-dist</artifactId>
   <version>0.2.0</version>

   <name>Escalante Distribution Assembly</name>

   <packaging>pom</packaging>

   
   <dependencies>
      <dependency>
         <groupId>org.scala-lang</groupId>
         <artifactId>scala-library</artifactId>
      </dependency>
      <dependency>
         <groupId>net.alchim31.maven</groupId>
         <artifactId>scala-maven-plugin</artifactId>
      </dependency>
      <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>escalante-lift</artifactId>
      </dependency>
      <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>escalante-lift</artifactId>
         <type>test-jar</type>
      </dependency>
      <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>escalante-core</artifactId>
      </dependency>
      <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>escalante-core</artifactId>
         <type>test-jar</type>
      </dependency>
      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-aether-provider</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-settings</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-settings-builder</artifactId>
      </dependency>
      <dependency>
         <groupId>org.sonatype.aether</groupId>
         <artifactId>aether-connector-wagon</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.maven.wagon</groupId>
         <artifactId>wagon-http-lightweight</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.shrinkwrap</groupId>
         <artifactId>shrinkwrap-impl-base</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.logging</groupId>
         <artifactId>jboss-logging</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.as</groupId>
         <artifactId>jboss-as-controller</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.as</groupId>
         <artifactId>jboss-as-dist</artifactId>
         <type>zip</type>
         <scope>provided</scope>
      </dependency>
   </dependencies>

   <build>
      <plugins>
         <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <version>${version.scala.tools}</version>
            <executions>
               <execution>
                  <id>scala-magic</id>
                  <phase>prepare-package</phase>
                  <goals>
                     <goal>script</goal>
                  </goals>
                  <configuration>
                     <keepGeneratedScript>true</keepGeneratedScript>
                     
                     <scriptFile>assemble.scala</scriptFile>
                     
                     <removeFromClasspath>aether-util-1.7,aether-spi-1.7,aether-impl-1.7,aether-api-1.7</removeFromClasspath>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>release</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-assembly-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>assemble</id>
                        <phase>package</phase>
                        <goals>
                           <goal>single</goal>
                        </goals>
                        <configuration>
                           <descriptors>
                              <descriptor>assembly.xml</descriptor>
                           </descriptors>
                           <finalName>escalante-${project.version}</finalName>
                           <appendAssemblyId>false</appendAssemblyId>
                           <outputDirectory>target/release</outputDirectory>
                           <workDirectory>target</workDirectory>
                           <tarLongFileMode>gnu</tarLongFileMode>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>

</project>