<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<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>org.glassfish.fighterfish</groupId>
        <artifactId>module-parent-pom</artifactId>
        <version>1.0.7</version>
    </parent>
    <artifactId>osgi-http</artifactId>
    <version>1.0.8</version>
    <packaging>jar</packaging>
    <name>OSGi HTTP Service Implementation for GlassFish Web Container</name>

    <scm>
        <connection>scm:git:https://github.com/eclipse-ee4j/glassfish-fighterfish.git</connection>
        <developerConnection>scm:git:git@github.com:eclipse-ee4j/glassfish-fighterfish.git</developerConnection>
        <url>https://github.com/eclipse-ee4j/glassfish-fighterfish/tree/master/module/osgi-http</url>
  </scm>
    
    <developers>
        <developer>
            <id>ss141213</id>
            <name>Sahoo</name>
            <organization>Oracle, Inc.</organization>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Export-Package>org.osgi.service.http</Export-Package>
                        <Private-Package>org.glassfish.osgihttp.*</Private-Package>
                        <Bundle-Activator>org.glassfish.osgihttp.Activator</Bundle-Activator>
                        <!-- This is needed if we want to include inhabitants generated by hk2-compile
                             in the final jar, as we don't use package phase of hk2-jar. 
                        <Include-Resource>{maven-resources}, 
                                          META-INF/inhabitants=${project.build.outputDirectory}/META-INF/inhabitants
                        </Include-Resource>
                        -->
                        <!-- We have a dependency on version of 3.1.1 of web container-->
                        <Import-Package>com.sun.enterprise.web; version=3.1.1, *</Import-Package>
                        <!--
                            We depend on Grizzly using Class.forName. See GLASSFISH-16538
                        -->
                        <DynamicImport-Package>
                            com.sun.grizzly.config.dom; version=1.9, org.glassfish.grizzly.config.dom; version=2.0
                        </DynamicImport-Package>
                        <Bundle-ActivationPolicy>lazy; include="org.osgi.service.http"</Bundle-ActivationPolicy>
                    </instructions>
                </configuration>
                <executions>
                   <execution>
                      <id>bundle</id>
                      <phase>package</phase>
                      <goals>
                         <!-- We use bundle goal to be able to include org.osgi.service.http packages
                              in the final jar -->
                         <goal>bundle</goal>
                      </goals>
                   </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.glassfish.main.web</groupId>
            <artifactId>web-glue</artifactId>
            <scope>provided</scope>
        </dependency>        
        <dependency>
            <groupId>org.glassfish.fighterfish</groupId>
            <artifactId>osgi-javaee-base</artifactId>
            <version>1.0.9</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
        </dependency>

    </dependencies>
    <profiles>
                <profile>
            <id>staging</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>sonatype-nexus-staging</id>
                    <name>Sonatype Nexus Staging</name>
                    <url>https://oss.sonatype.org/content/repositories/staging</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>sonatype-nexus-staging</id>
                    <name>Sonatype Nexus Staging</name>
                    <url>https://oss.sonatype.org/content/repositories/staging</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>

</project>
