<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2014-2023 Philip Helger (www.helger.com)
    philip[at]helger[dot]com

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>
  <parent>
    <groupId>com.helger.photon</groupId>
    <artifactId>ph-oton-parent-pom</artifactId>
    <version>9.1.1</version>
  </parent>
  <artifactId>ph-oton-jetty</artifactId>
  <packaging>bundle</packaging>
  <name>ph-oton-jetty</name>
  <description>Embedded Jetty runner for all Java web applications</description>
  <url>https://github.com/phax/ph-oton/ph-oton-jetty</url>
  <inceptionYear>2016</inceptionYear>
  
  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <organization>
    <name>Philip Helger</name>
    <url>http://www.helger.com</url>
  </organization>
  
  <developers>
    <developer>
      <id>philip</id>
      <name>Philip Helger</name>
      <email>ph(at)helger.com</email>
      <url>http://www.helger.com</url>
    </developer>
  </developers>

  <!-- 
    Include this only in this project, to avoid that this spams the import list of all other ph-oton projects
    as it also contains Spring etc.
   -->  
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-bom</artifactId>
        <version>${jetty.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  
  <dependencies>
    <dependency>
      <groupId>com.helger.commons</groupId>
      <artifactId>ph-commons</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-webapp</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-servlet</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.eclipse.jetty.toolchain</groupId>
          <artifactId>jetty-servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>apache-jsp</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.eclipse.jetty.toolchain</groupId>
          <artifactId>jetty-servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Automatic-Module-Name>com.helger.photon.jetty</Automatic-Module-Name>
            <Export-Package>com.helger.photon.jetty.*</Export-Package>
            <Import-Package>!javax.annotation.*,*</Import-Package>
            <Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
            <Provide-Capability>osgi.serviceloader; osgi.serviceloader=com.helger.commons.thirdparty.IThirdPartyModuleProviderSPI</Provide-Capability>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
