<?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/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>mq-project</artifactId>
        <groupId>org.fusesource.mq</groupId>
        <version>7.0.2.fuse-097</version>
        <relativePath>..</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <packaging>war</packaging>

    <artifactId>mq-web-console</artifactId>

    <dependencies>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-web-console</artifactId>
            <version>${activemq-version}</version>
            <type>war</type>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>${jetty-version}</version>
                <configuration>
                    <connectors>
                        <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                            <port>8080</port>
                            <maxIdleTime>60000</maxIdleTime>
                        </connector>
                    </connectors>

                    <webAppConfig>
                        <contextPath>/</contextPath>
                    </webAppConfig>

                    <systemProperties>
                        <!-- enable easy connection to JConsole -->
                        <systemProperty>
                            <name>com.sun.management.jmxremote</name>
                            <value/>
                        </systemProperty>

                        <!-- Start an own broker -->
                        <systemProperty>
                            <name>webconsole.type</name>
                            <value>embedded</value>
                        </systemProperty>

                        <!--
                           Use the following configuration to connect to a remote broker using JMX
                                    <systemProperty>
                                      <name>webconsole.type</name>
                                      <value>properties</value>
                                    </systemProperty>
                                    <systemProperty>
                                      <name>webconsole.jms.url</name>
                                      <value>tcp://localhost:61616</value>
                                    </systemProperty>
                                    <systemProperty>
                                      <name>webconsole.jmx.url</name>
                                      <value>service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</value>
                                    </systemProperty>
                        -->
                    </systemProperties>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <supportedProjectTypes>
                        <supportedProjectType>jar</supportedProjectType>
                        <supportedProjectType>bundle</supportedProjectType>
                        <supportedProjectType>war</supportedProjectType>
                    </supportedProjectTypes>
                    <instructions>
                        <Webapp-Context>fusemq</Webapp-Context>
                        <Web-ContextPath>fusemq</Web-ContextPath>
                        <Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
                        <Embed-Directory>WEB-INF/lib</Embed-Directory>
                        <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
                        <Embed-Transitive>true</Embed-Transitive>
                        <Import-Package>
                            org.xml.sax,
                            org.xml.sax.helpers,
                            javax.xml.parsers,
                            javax.xml.transform,
                            javax.management.remote,
                            javax.naming,
                            org.w3c.dom,
                            javax.servlet*,
                            javax.servlet.jsp,
                            javax.servlet.jsp.tagext,
                            javax.servlet.jsp.el,
                            javax.management,
                            javax.management.openmbean,
                            javax.net,
                            org.apache.commons.logging;version="[1.1,2)";resolution:=optional,
                            org.slf4j;version="[1.5,2)";resolution:=optional,
                            org.slf4j.spi;version="[1.5,2)";resolution:=optional,
                            org.apache.log4j;version="[1.2.14,2)";resolution:=optional,
                            org.apache.log4j.spi;version="[1.2.14,2)";resolution:=optional
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <archive>
                        <manifestFile>target/war/work/org.apache.activemq/activemq-web-console/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>


</project>