<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.cibseven.community.rest-client</groupId>
    <artifactId>cibseven-engine-rest-client-root</artifactId>
    <version>2.2.0</version>
  </parent>

  <artifactId>cibseven-engine-rest-client-complete-springboot-starter</artifactId>
  <name>CIB seven Engine REST Client Complete Spring Boot Starter</name>
  <dependencies>
    <!-- Open API client -->
    <dependency>
      <groupId>org.cibseven.community.rest-client</groupId>
      <artifactId>cibseven-engine-rest-client-openapi-springboot</artifactId>
    </dependency>
    <!-- External Task client -->
    <dependency>
      <groupId>org.cibseven.bpm.springboot</groupId>
      <artifactId>cibseven-bpm-spring-boot-starter-external-task-client-4</artifactId>
    </dependency>
  </dependencies>

  <profiles>
    <!--
      Force both maven-source-plugin and maven-javadoc-plugin to be created (empty),
      so Maven Central doesn't reject the deployment.
    -->
    <profile>
      <id>javadocAndSources</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <configuration>
              <forceCreation>true</forceCreation>
            </configuration>
          </plugin>
          <plugin>
            <!-- maven-javadoc-plugin has no forceCreation equivalent, so build the empty jar directly -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
              <execution>
                <id>empty-javadoc-jar</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <phase>package</phase>
                <configuration>
                  <classifier>javadoc</classifier>
                  <classesDirectory>${project.build.directory}/empty-javadoc</classesDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
