<?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.8</version>
        <relativePath>../../../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.sun.grizzly</groupId>
    <artifactId>grizzly-http-webserver</artifactId>
    <packaging>bundle</packaging>
    <version>${grizzly-version}</version>
    <name>grizzly-http-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>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Import-Package>*</Import-Package>
                        <Export-Package>com.sun.grizzly.*;-split-package:=merge-first</Export-Package>
                        <Embed-Dependency>com.sun.grizzly;scope=runtime</Embed-Dependency>
                        <Main-Class>com.sun.grizzly.standalone.Main</Main-Class>
                    </instructions>
                </configuration>
            </plugin>   
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </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>
    </dependencies>
</project>
