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

    Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<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">
    <parent>
        <groupId>org.glassfish.main.jms</groupId>
        <artifactId>jms</artifactId>
        <version>5.1.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>jmsra</artifactId>
    <packaging>distribution-fragment</packaging>
    <name>JMS GlassFish System RA Assembly</name>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
                <artifactId>maven-antrun-extended-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <configuration>
                            <tasks>
                                <resolveArtifact artifactId="mq-distribution" property="mq-distribution.zip" />
				<mkdir dir="target/tmp" />
				<mkdir dir="target/classes/glassfish/lib/install/applications/jmsra" />
				<unzip src="${mq-distribution.zip}" dest="target/tmp">
                                    <patternset>
					    <include name="mq/lib/imqjmsra.rar" />
				    </patternset>
			        </unzip>
				<unzip src="target/tmp/mq/lib/imqjmsra.rar" dest="target/classes/glassfish/lib/install/applications/jmsra">
                                </unzip>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <developers>
        <developer>
            <id>snjezana</id>
            <name>Snjezana Sevo-Zenzerovic</name>
            <organization>Oracle, Inc.</organization>
        </developer>
    </developers>
    <dependencies>
        <dependency>
            <groupId>org.glassfish.mq</groupId>
            <artifactId>mq-distribution</artifactId>
            <version>${mq.version}</version>
	    <type>zip</type>
        </dependency>
    </dependencies>
</project>
