<?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 WebApp Bundle</name>

  <groupId>org.jboss.osgi.webapp</groupId>
  <artifactId>jbosgi-webapp</artifactId>
  <packaging>bundle</packaging>

  <!-- Parent -->
  <parent>
    <groupId>org.jboss.osgi.webapp</groupId>
    <artifactId>jbosgi-webapp-parent</artifactId>
    <version>1.0.2</version>
  </parent>

  <!-- Dependencies -->
  <dependencies>
    <dependency>
      <groupId>org.jboss.osgi.deployment</groupId>
      <artifactId>jbosgi-deployment</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.osgi.http</groupId>
      <artifactId>jboss-osgi-http</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.osgi.spi</groupId>
      <artifactId>jbosgi-spi</artifactId>
    </dependency>

    <!-- PAX-Web -->
    <dependency>
      <groupId>org.ops4j.pax.web</groupId>
      <artifactId>pax-web-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.web</groupId>
      <artifactId>pax-web-extender-war</artifactId>
    </dependency>

    <!-- OSGi Dependencies -->
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
            <Bundle-Activator>org.jboss.osgi.webapp.internal.WebAppActivator</Bundle-Activator>
            <Export-Package>
              org.jboss.osgi.webapp;version=${version}
            </Export-Package>
            <Private-Package>
              org.jboss.osgi.webapp.internal,
              org.ops4j.pax.web.extender.war.internal,
            </Private-Package>
            <Import-Package>
              javax.security.auth.x500,
              javax.servlet,
              javax.servlet.http,
              javax.xml.parsers,

              org.apache.commons.logging;version="[1.1,1.2)",
              org.jboss.logging;version="[3.0,4.0)",
              org.jboss.osgi.deployment*;version="[1.0,2.0)",
              org.jboss.osgi.http;version="[1.0,2.0)",
              org.jboss.osgi.spi*;version="[1.0,2.0)",
              org.jboss.osgi.vfs;version="[1.0,2.0)",

              org.ops4j.pax.web.service,
              org.osgi.service.http,
              org.osgi.framework,
              org.osgi.util.tracker,
              org.w3c.dom,
              org.xml.sax,
              
              !javax.microedition.io, 
              !org.ops4j.pax.web.service.spi
            </Import-Package>
            <Embed-Transitive>true</Embed-Transitive>
            <Embed-Dependency>
              pax-web-api;inline=false,
              pax-web-extender-war;inline=false,
            </Embed-Dependency>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
