<?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>org.drools</groupId>
    <artifactId>guvnor-jcr2vfs-migration</artifactId>
    <version>5.6.0.Final</version>
  </parent>

  <artifactId>guvnor-jcr2vfs-migration-webapp-drools-as-jar</artifactId>
  <packaging>pom</packaging>

  <name>Guvnor JCR to UberFire VFS migration: Guvnor web application Drools as JAR</name>
  <description>Repackages Guvnor 5 war content as a jar for the JCR to UberFire VFS migration in Guvnor 6</description>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.drools</groupId>
                  <artifactId>guvnor-webapp-drools</artifactId>
                  <type>war</type>
                  <version>${project.version}</version>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${project.build.directory}/unpacked</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/assembly-war-as-jar.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
