<?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>com.sun.grizzly</groupId>
        <artifactId>grizzly-project</artifactId>
        <version>1.9.18-i</version>
        <relativePath>../../../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.sun.grizzly</groupId>
    <artifactId>grizzly-servlet-webserver</artifactId>
    <packaging>jar</packaging>
    <version>${grizzly-version}</version>
    <name>grizzly-servlet-webserver</name>
    <url>https://grizzly.dev.java.net</url>
    <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>${felix-version}</version>
                <configuration>
                    <instructions>
                        <Import-Package>*</Import-Package>
                        <Export-Package>com.sun.grizzly.*;-split-package:=merge-first,javax.servlet.*</Export-Package>
                        <Embed-Dependency>com.sun.grizzly;scope=runtime</Embed-Dependency>
                        <Main-Class>com.sun.grizzly.standalone.servlet.ServletLauncher</Main-Class>
                    </instructions>
                    <unpackBundle>true</unpackBundle>
                </configuration>
                <executions>
                    <execution>
                        <id>osgi-bundle</id>
                        <phase>package</phase>
                        <goals>
                            <goal>bundle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release-profile</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
                        <artifactId>maven-antrun-extended-plugin</artifactId>
                        <configuration>
                            <tasks>
                                <resolveAll todir="target/javadoc-jars" classifier="javadoc">
                                    <fullGraph />
                                    <groupId value="com.sun.grizzly" />
                                </resolveAll>
                                <zip destfile="target/${pom.artifactId}-${pom.version}-javadoc.jar">
                                    <zipgroupfileset dir="target/javadoc-jars" includes="*.jar" />
                                </zip>
                                <resolveAll todir="target/source-jars" classifier="sources">
                                    <fullGraph />
                                    <groupId value="com.sun.grizzly" />
                                </resolveAll>
                                <zip destfile="target/${pom.artifactId}-${pom.version}-sources.jar">
                                    <zipgroupfileset dir="target/source-jars" includes="*.jar" />
                                </zip>
                            </tasks>
                        </configuration>
                        <executions>
                            <execution>
                              <!-- executes after source:jar executes in the package phase -->
                                <phase>install</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <dependencies>
        <dependency>
            <groupId>com.sun.grizzly</groupId>
            <artifactId>grizzly-http</artifactId>
            <version>${grizzly-version}</version>
        </dependency>
        <dependency>
            <groupId>com.sun.grizzly</groupId>
            <artifactId>grizzly-http-servlet</artifactId>
            <version>${grizzly-version}</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>${servlet-version}</version>
        </dependency>
    </dependencies>
</project>
