<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">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>brooklyn-launcher</artifactId>
    <packaging>bundle</packaging>
    <name>Brooklyn Launcher</name>
    <description>
        This project contains a brooklyn.launcher.Main class
        for command-line invocation, and includes the 
        Brooklyn WAR in its JAR for classpath-based starting.
    </description>

    <parent>
        <groupId>io.brooklyn</groupId>
        <artifactId>brooklyn-parent</artifactId>
        <version>0.4.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <properties>
        <jetty.version>7.4.4.v20110707</jetty.version>
        <jsp.version>2.1.v20100127</jsp.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.brooklyn</groupId>
            <artifactId>brooklyn-core</artifactId>
        </dependency>

        <dependency>
            <groupId>io.brooklyn</groupId>
            <artifactId>brooklyn-test-support</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>4.3.0</version>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-webapp</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-plus</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-jmx</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-jsp-2.1</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-annotations</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-start</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-jndi</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-websocket</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jsp-2.1-glassfish</artifactId>
          <version>${jsp.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <!-- copy the WAR so it is available on the classpath for programmatic deployment -->
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <!-- this can fail in eclipse trying to copy _from_ target/classes.
                                         see http://jira.codehaus.org/browse/MDEP-259 -->
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>brooklyn-web-console</artifactId>
                                    <version>${project.version}</version>
                                    <type>war</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>target/classes</outputDirectory>
                                    <destFileName>brooklyn.war</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Include-Resource>{maven-resources}, target/classes/brooklyn.war</Include-Resource>
                        <Bundle-Activator>brooklyn.launcher.Activator</Bundle-Activator>
                        <Main-class>brooklyn.launcher.Main</Main-class>
                    </instructions>
                </configuration>
            </plugin>
            <plugin> 
                <artifactId>maven-site-plugin</artifactId> 
                <configuration> 
                    <generateReports>false</generateReports> 
                </configuration> 
            </plugin>
		</plugins>
	</build>
</project>
