<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Fuse EAP :: Config
  %%
  Copyright (C) 2015 RedHat
  %%
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
       http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  #L%
  -->
<!--
- Copyright 2014 Red Hat Inc. and/or its affiliates and other contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-->
<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>com.redhat.fuse.eap</groupId>
        <artifactId>fuse-eap</artifactId>
        <version>6.2.1.redhat-216</version>
    </parent>

    <name>Fuse EAP :: Installer</name>
    <artifactId>fuse-eap-installer</artifactId>

    <description>Fuse on EAP Installer</description>

    <dependencies>
        <dependency>
            <groupId>com.redhat.fuse.eap</groupId>
            <artifactId>fuse-eap-distro</artifactId>
            <version>${project.version}</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.wildfly.extras.patch</groupId>
            <artifactId>fuse-patch-installer</artifactId>
            <version>${version.fuse.patch}</version>
        </dependency>
    </dependencies>
    
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-fuse-patch-installer</id>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
                            <includes>org/wildfly/extras/patch/installer/*.class</includes>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.wildfly.extras.patch</groupId>
                                    <artifactId>fuse-patch-installer</artifactId>
                                    <version>${version.fuse.patch}</version>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-fuse-eap-distro</id>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/classes/META-INF/repository</outputDirectory>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.wildfly.extras.patch</groupId>
                                    <artifactId>fuse-patch-distro-wildfly</artifactId>
                                    <version>${version.fuse.patch}</version>
                                    <type>zip</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.redhat.fuse.eap</groupId>
                                    <artifactId>fuse-eap-distro</artifactId>
                                    <version>${project.version}</version>
                                    <type>zip</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>org.jboss.fuse.eap.installer.internal.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
