<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  wcm.io
  %%
  Copyright (C) 2014 wcm.io
  %%
  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.
  #L%
  -->

<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>

  <parent>
    <groupId>io.wcm.osgi.wrapper</groupId>
    <artifactId>io.wcm.osgi.wrapper.parent</artifactId>
    <version>1.0.2</version>
    <relativePath>../parent/pom.xml</relativePath>
  </parent>

  <properties>
    <pkgVersion>2.20</pkgVersion>
    <osgiVersion>${pkgVersion}</osgiVersion>
  </properties>

  <groupId>io.wcm.osgi.wrapper</groupId>
  <artifactId>io.wcm.osgi.wrapper.jersey</artifactId>
  <version>2.20-0000</version>
  <packaging>bundle</packaging>
  <name>Jersey</name>

  <description>
    RESTful Web Services in Java
  </description>
  <organization>
    <url>https://jersey.java.net/</url>
  </organization>

  <licenses>
    <license>
      <name>CDDL+GPL License</name>
      <url>http://glassfish.java.net/public/CDDL+GPL_1_1.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
    
  <scm>
    <connection>scm:git:https://github.com/wcm-io/wcm-io-osgi-wrapper.git</connection>
    <developerConnection>scm:git:https://github.com/wcm-io/wcm-io-osgi-wrapper.git</developerConnection>
    <url>https://github.com/wcm-io/wcm-io-osgi-wrapper</url>
    <tag>HEAD</tag>
  </scm>

  <dependencies>
    <dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-servlet</artifactId>
      <version>${pkgVersion}</version>
      <exclusions>
        <exclusion>
          <groupId>org.glassfish.hk2.external</groupId>
          <artifactId>javax.inject</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-server</artifactId>
      <version>${pkgVersion}</version>
      <exclusions>
        <exclusion>
          <groupId>org.glassfish.hk2.external</groupId>
          <artifactId>javax.inject</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-client</artifactId>
      <version>${pkgVersion}</version>
      <exclusions>
        <exclusion>
          <groupId>org.glassfish.hk2.external</groupId>
          <artifactId>javax.inject</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-multipart</artifactId>
      <version>${pkgVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.ext</groupId>
      <artifactId>jersey-bean-validation</artifactId>
      <version>${pkgVersion}</version>
      <exclusions>
        <exclusion>
          <groupId>org.glassfish.hk2.external</groupId>
          <artifactId>javax.inject</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate-validator</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.el</groupId>
          <artifactId>javax.el-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.glassfish.web</groupId>
          <artifactId>javax.el</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <!-- Do not inline jars, include as jar files -->
            <Embed-Dependency>
              *;scope=compile|runtime;inline=false;groupId=org.glassfish.jersey.*,
              *;scope=compile|runtime;inline=false;groupId=org.glassfish.hk2.*,
              *;scope=compile|runtime;inline=false;groupId=org.javassist,
              *;scope=compile|runtime;inline=false;groupId=org.jvnet.mimepull
            </Embed-Dependency>
            <Embed-Transitive>true</Embed-Transitive>
            <!-- use _exportcontents instead of Export-Package to avoid conflict with Embed-Dependency an inline=true -->
            <_exportcontents>
              org.glassfish.jersey.*;version=${osgiVersion}
            </_exportcontents>
            <Import-Package>
              javax.persistence.*;resolution:=optional,
              javax.servlet.annotation.*;resolution:=optional,
              com.sun.jdi.*;resolution:=optional,
              sun.misc.*;resolution:=optional,
              jersey.repackaged.com.google.common.cache.LocalCache.jersey.repackaged.com.google.common.cache.*;resolution:=optional,
              jersey.repackaged.com.google.common.collect.AbstractMapBasedMultimap.jersey.repackaged.com.google.common.collect.*;resolution:=optional,
              jersey.repackaged.com.google.common.collect.ImmutableMultiset.jersey.repackaged.com.google.common.collect.*;resolution:=optional,
              jersey.repackaged.com.google.common.collect.MapMakerInternalMap.jersey.repackaged.com.google.common.collect.*;resolution:=optional,
              jersey.repackaged.com.google.common.collect.StandardTable.jersey.repackaged.com.google.common.collect.*;resolution:=optional,
              jersey.repackaged.com.google.common.collect.AbstractMultimap.jersey.repackaged.com.google.common.collect;resolution:=optional,
              jersey.repackaged.com.google.common.collect.FilteredKeyMultimap.jersey.repackaged.com.google.common.collect;resolution:=optional,
              jersey.repackaged.com.google.common.collect.ImmutableMultimap.jersey.repackaged.com.google.common.collect;resolution:=optional,
              jersey.repackaged.com.google.common.collect.Maps$FilteredEntryMap.jersey.repackaged.com.google.common.collect;resolution:=optional,
              *
            </Import-Package>
          </instructions>
        </configuration>
      </plugin>

    </plugins>
  </build>

</project>
