<?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/maven-v4_0_0.xsd">
  <parent>
	  <groupId>io.hawt</groupId>
	  <artifactId>project</artifactId>
    <version>1.5.0</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>hawtio-osgi-devmode</artifactId>
  <packaging>bundle</packaging>
  <name>${project.artifactId}</name>
  <description>hawtio :: DevServlet Managed Service Factory</description>

  <properties>

    <fuse.osgi.export>
      io.hawt.web.dev;-noimport:=true
    </fuse.osgi.export>
    <fuse.osgi.import>
      *;resolution:=optional
    </fuse.osgi.import>

  </properties>

  <dependencies>

    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <version>${osgi-version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <version>${osgi-version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.ops4j.pax.web</groupId>
      <artifactId>pax-web-api</artifactId>
      <version>${ops4j-pax-web-version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>${servlet-api-version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>${log4j-version}</version>
      <scope>provided</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>${maven-bundle-plugin-version}</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <manifestLocation>${webapp-outdir}/META-INF</manifestLocation>
          <instructions>
            <Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
            <Bundle-Name>${project.description}</Bundle-Name>
            <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
            <Import-Package>${fuse.osgi.import}</Import-Package>
            <Export-Package>${fuse.osg.export}</Export-Package>
            <Implementation-Title>HawtIO</Implementation-Title>
            <Implementation-Version>${project.version}</Implementation-Version>
          </instructions>
        </configuration>
      </plugin>

    </plugins>
  </build>
</project>
