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

<!-- ====================================================================== -->
<!-- -->
<!-- JBoss, the OpenSource J2EE webOS -->
<!-- -->
<!-- Distributable under LGPL license. -->
<!-- See terms of license at http://www.gnu.org. -->
<!-- -->
<!-- ====================================================================== -->

<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>

    <name>JBossOSGi Distribution Installer</name>

    <groupId>org.jboss.osgi.distribution</groupId>
    <artifactId>jboss-osgi-installer</artifactId>
    <packaging>pom</packaging>

    <!-- Parent -->
    <parent>
        <groupId>org.jboss.osgi.distribution</groupId>
        <artifactId>jboss-osgi-distribution</artifactId>
        <version>1.1.0</version>
    </parent>

    <!-- Dependencies -->
    <dependencies>
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.osgi</groupId>
            <artifactId>arquillian-osgi-bundle</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.osgi.distribution</groupId>
            <artifactId>jboss-osgi-javadoc</artifactId>
            <version>${project.version}</version>
            <classifier>javadoc</classifier>
        </dependency>
        <dependency>
            <groupId>org.jboss.osgi.framework</groupId>
            <artifactId>jbosgi-framework-aggregated</artifactId>
            <version>${version.jboss.osgi.framework}</version>
            <classifier>all</classifier>
        </dependency>
        <dependency>
            <groupId>org.jboss.osgi.jmx</groupId>
            <artifactId>jbosgi-jmx</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.osgi.testsuite</groupId>
            <artifactId>jboss-osgi-testsuite-example</artifactId>
            <version>${project.version}</version>
            <type>zip</type>
        </dependency>
        <dependency>
            <groupId>org.jboss.osgi.xerces</groupId>
            <artifactId>jbosgi-xerces</artifactId>
        </dependency>

        <!-- Aries Dependencies -->
        <dependency>
            <groupId>org.apache.aries.blueprint</groupId>
            <artifactId>org.apache.aries.blueprint</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.jmx</groupId>
            <artifactId>org.apache.aries.jmx</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries.proxy</groupId>
            <artifactId>org.apache.aries.proxy</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.aries</groupId>
            <artifactId>org.apache.aries.util</artifactId>
        </dependency>

        <!-- Felix Dependencies -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.configadmin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.eventadmin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.log</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr</artifactId>
        </dependency>

        <!-- izpack -->
        <dependency>
            <groupId>org.codehaus.izpack</groupId>
            <artifactId>izpack-standalone-compiler</artifactId>
            <version>${version.izpack}</version>
        </dependency>
    </dependencies>

    <!-- Plugins -->
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>directory-single</goal>
                        </goals>
                        <configuration>
                            <finalName>deploy-artifacts</finalName>
                            <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>scripts/assembly-deploy-artifacts.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>izpack</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <property name="maven.runtime.classpath" refid="maven.runtime.classpath"/>
                                <property name="framework" value="${framework}"/>
                                <!-- ${jboss.home} is available in the hudson run -->
                                <property name="product.name" value="${project.name}"/>
                                <property name="product.short.name" value="${artifactId}"/>
                                <property name="product.version" value="${project.version}"/>
                                <property name="target.container" value="${target.container}"/>
                                <property name="user.home" value="${user.home}"/>
                                <ant antfile="scripts/antrun-installer.xml" target="build-installer"/>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>target/jboss-osgi-installer-${project.version}.jar</file>
                                    <classifier>installer</classifier>
                                    <type>jar</type>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
