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

    Copyright (c) 1997, 2018 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>
        <artifactId>bundles</artifactId>
        <groupId>com.sun.xml.ws</groupId>
        <version>2.3.2</version>
    </parent>

    <groupId>com.sun.xml.ws</groupId>
    <artifactId>jaxws-tools</artifactId>
    <version>2.3.2</version>
    
    <packaging>pom</packaging>
    <name>JAX-WS RI Tools Bundle</name>
    <description>Open source Reference Implementation of JSR-224: Java API for XML Web Services</description>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jaxws-rt</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-xjc</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-jxc</artifactId>
        </dependency>

        <!-- module dependencies -->
        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>wscompile</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>tools</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- module sources -->
        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>wscompile</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>tools</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <modules>
        <module>../../tools/wscompile</module>
        <module>tools</module>
    </modules>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>make-bin-assembly</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/assembly/assembly.xml</descriptor>
                            </descriptors>
                            <archive>
                                <manifest>
                                    <mainClass>com.sun.tools.ws.WsImport</mainClass>
                                </manifest>
                                <manifestEntries>
                                    <Class-Path>jaxws-rt.jar jaxb-xjc.jar jaxb-jxc.jar</Class-Path>
                                    <Extension-Name>com.sun.tools.jaxws</Extension-Name>
                                    <Multi-Release>true</Multi-Release>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </execution>
                    <execution>
                        <id>make-src-assembly</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>true</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/assembly/assembly-src.xml</descriptor>
                            </descriptors>
                            <archive>
                                <manifest>
                                    <mainClass>com.sun.tools.ws.WsImport</mainClass>
                                </manifest>
                                <manifestEntries>
                                    <Class-Path>jaxws-rt.jar jaxb-xjc.jar jaxb-jxc.jar</Class-Path>
                                    <Extension-Name>com.sun.tools.ws</Extension-Name>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>oss-release</id>
            <dependencies>
                <!-- module javadoc -->
                <dependency>
                    <groupId>com.sun.xml.ws</groupId>
                    <artifactId>tools</artifactId>
                    <version>${project.version}</version>
                    <classifier>javadoc</classifier>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>make-javadoc-assembly</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <appendAssemblyId>true</appendAssemblyId>
                                    <descriptors>
                                        <descriptor>src/main/assembly/assembly-javadoc.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>