<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2012-2018 Red Hat, Inc.
    This program and the accompanying materials are made
    available under the terms of the Eclipse Public License 2.0
    which is available at https://www.eclipse.org/legal/epl-2.0/

    SPDX-License-Identifier: EPL-2.0

    Contributors:
      Red Hat, Inc. - initial API and implementation

-->
<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>
        <artifactId>che-assembly-parent</artifactId>
        <groupId>org.eclipse.che</groupId>
        <version>7.17.2</version>
    </parent>
    <artifactId>assembly-main</artifactId>
    <packaging>pom</packaging>
    <name>Che Assembly :: Assemblies Che Server Tomcat</name>
    <dependencies>
        <dependency>
            <groupId>org.eclipse.che</groupId>
            <artifactId>assembly-che-tomcat8</artifactId>
            <type>zip</type>
        </dependency>
        <dependency>
            <groupId>org.eclipse.che</groupId>
            <artifactId>assembly-dashboard-war</artifactId>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.eclipse.che</groupId>
            <artifactId>assembly-root-war</artifactId>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.eclipse.che</groupId>
            <artifactId>assembly-swagger-war</artifactId>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.eclipse.che</groupId>
            <artifactId>assembly-workspace-loader-war</artifactId>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.eclipse.che</groupId>
            <artifactId>assembly-wsmaster-war</artifactId>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <updateOnly>false</updateOnly>
                    <descriptors>
                        <descriptor>${project.basedir}/src/assembly/assembly.xml</descriptor>
                    </descriptors>
                    <finalName>eclipse-che-${project.version}</finalName>
                    <tarLongFileMode>posix</tarLongFileMode>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-tomcat</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.eclipse.che</groupId>
                                    <artifactId>assembly-che-tomcat8</artifactId>
                                    <type>zip</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/dependency/assembly-che-tomcat8</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.eclipse.che</groupId>
                                    <artifactId>assembly-dashboard-war</artifactId>
                                    <type>war</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/dependency/assembly-dashboard-war</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.eclipse.che</groupId>
                                    <artifactId>assembly-workspace-loader-war</artifactId>
                                    <type>war</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/dependency/assembly-workspace-loader-war</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
