<?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>
    <artifactId>hazelcast-jet-root</artifactId>
    <groupId>com.hazelcast.jet</groupId>
    <version>4.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>hazelcast-jet</artifactId>
  <name>hazelcast-jet-all</name>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <archive>
            <index>true</index>
            <compress>true</compress>
            <manifest>
              <mainClass>com.hazelcast.jet.server.JetMemberStarter</mainClass>
            </manifest>
            <manifestEntries>
              <Automatic-Module-Name>com.hazelcast.jet</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <createSourcesJar>true</createSourcesJar>
          <shadeSourcesContent>true</shadeSourcesContent>
          <createDependencyReducedPom>true</createDependencyReducedPom>
          <artifactSet>
            <includes>
              <include>com.hazelcast.jet:*</include>
              <include>com.hazelcast:*</include>
              <include>info.picocli:picocli</include>
              <include>io.github.classgraph:classgraph</include>
              <include>com.fasterxml.jackson.jr:jackson-jr-objects</include>
              <include>com.fasterxml.jackson.jr:jackson-jr-annotation-support</include>
              <include>com.fasterxml.jackson.core:jackson-core</include>
            </includes>
          </artifactSet>
          <filters>
            <filter>
              <artifact>com.hazelcast:hazelcast</artifact>
              <excludes>
                <exclude>com/hazelcast/com/fasterxml/**</exclude>
                <exclude>META-INF/services/com.hazelcast.com.fasterxml.jackson.core.JsonFactory</exclude>
              </excludes>
            </filter>
          </filters>
          <relocations>
            <relocation>
              <pattern>picocli</pattern>
              <shadedPattern>com.hazelcast.jet.picocli</shadedPattern>
            </relocation>
            <relocation>
              <pattern>io.github.classgraph</pattern>
              <shadedPattern>com.hazelcast.jet.io.github.classgraph</shadedPattern>
            </relocation>
            <relocation>
              <pattern>nonapi.io.github.classgraph</pattern>
              <shadedPattern>com.hazelcast.jet.nonapi.io.github.classgraph</shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.fasterxml.jackson.jr</pattern>
              <shadedPattern>com.hazelcast.com.fasterxml.jackson.jr</shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.fasterxml.jackson.core</pattern>
              <shadedPattern>com.hazelcast.com.fasterxml.jackson.core</shadedPattern>
            </relocation>
          </relocations>
          <transformers>
            <transformer />
          </transformers>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <includeDependencySources>true</includeDependencySources>
          <includeTransitiveDependencySources>true</includeTransitiveDependencySources>
          <dependencySourceIncludes>
            <dependencySourceInclude>com.hazelcast:*</dependencySourceInclude>
            <dependencySourceInclude>com.hazelcast.jet:*</dependencySourceInclude>
          </dependencySourceIncludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>unshaded</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-shade-plugin</artifactId>
            <configuration>
              <artifactSet>
                <excludes>
                  <exclude>com.hazelcast:hazelcast:*</exclude>
                </excludes>
              </artifactSet>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>test-enterprise</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <includeDependencySources>true</includeDependencySources>
              <includeTransitiveDependencySources>true</includeTransitiveDependencySources>
              <dependencySourceIncludes>
                <dependencySourceInclude>com.hazelcast.jet</dependencySourceInclude>
              </dependencySourceIncludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>com.hazelcast.jet</groupId>
      <artifactId>hazelcast-jet-core</artifactId>
      <version>4.2</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.cache</groupId>
      <artifactId>cache-api</artifactId>
      <version>1.0.0</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.jms</groupId>
      <artifactId>javax.jms-api</artifactId>
      <version>2.0.1</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <version>4.2.0</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>javax.annotation-api</artifactId>
      <version>1.2</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>2.12.1</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.28</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>annotations</artifactId>
      <version>3.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.hazelcast</groupId>
      <artifactId>hazelcast</artifactId>
      <version>4.0.1</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.12.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>2.28.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>byte-buddy</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
        <exclusion>
          <artifactId>byte-buddy-agent</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
        <exclusion>
          <artifactId>objenesis</artifactId>
          <groupId>org.objenesis</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
      <version>1.3</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.15.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <version>2.0.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>powermock-module-junit4-common</artifactId>
          <groupId>org.powermock</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.reflections</groupId>
      <artifactId>reflections</artifactId>
      <version>0.9.10</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
        <exclusion>
          <artifactId>javassist</artifactId>
          <groupId>org.javassist</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
