<?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/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>org.mock-server</groupId>
        <artifactId>mockserver</artifactId>
        <version>7.0.0</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <artifactId>mockserver-client-java-no-dependencies</artifactId>

    <name>MockServer Java Client (No Dependencies)</name>
    <description>A java client for the MockServer with all dependencies shaded</description>
    <url>https://www.mock-server.com</url>

    <properties>
        <module.name>org.mockserver.client</module.name>
    </properties>

    <dependencies>
        <!-- optional: shade bundles the source module's classes into this
             self-contained jar, so consumers of this no-dependencies artifact
             must not also receive the unshaded source module (and its
             transitive dependencies) on their classpath. Shade still bundles a
             module's own optional dependencies. -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>mockserver-client-java</artifactId>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.12.0</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <doclint>none</doclint>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- The parent pom's release profile attaches a -javadoc.jar via
             maven-javadoc-plugin, but these no-dependencies modules have no
             sources of their own, so nothing is produced and Maven Central
             rejects the deployment. Build the javadoc jar from the
             org.mock-server dependency sources that this module shades. -->
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <includeDependencySources>true</includeDependencySources>
                                    <dependencySourceIncludes>
                                        <dependencySourceInclude>org.mock-server:*</dependencySourceInclude>
                                    </dependencySourceIncludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
