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

    Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Distribution License v. 1.0, which is available at
    http://www.eclipse.org/org/documents/edl-v10.php.

    SPDX-License-Identifier: BSD-3-Clause

-->

<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.metro</groupId>
        <artifactId>bundles</artifactId>
        <version>2.4.4</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>webservices-extra-jdk-packages</artifactId>
    <packaging>jar</packaging>
    <name>Extra JDK 6 packages required by Metro Web Services OSGi bundle</name>
    <description>Extra JDK 6 packages required by Metro Web Services OSGi bundle</description>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${mf.dir}/META-INF/MANIFEST.MF</manifestFile>
                        <manifestEntries>
                            <Export-Package>
                                com.sun.org.apache.xml.internal.resolver.tools,
                                com.sun.org.apache.xml.internal.resolver,
                                com.sun.source.tree,
                                com.sun.source.util,
                                com.sun.tools.javac.processing,
                                com.sun.tools.javac.util
                            </Export-Package>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                        <configuration>
                            <manifestLocation>${manifest.folder}/META-INF</manifestLocation>
                            <instructions>
                                <Fragment-Host>system.bundle;extension:=framework</Fragment-Host>
                            </instructions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-manifest</id>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <phase>prepare-package</phase>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>${manifest.folder}</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                            <outputDirectory>${mf.dir}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <manifest.folder>${project.build.directory}/generated-manifest</manifest.folder>
    </properties>
</project>
