<?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>docker-extension-parent</artifactId>
    <groupId>org.ballerinax.docker</groupId>
    <version>1.0.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>docker-extension</artifactId>
  <name>Ballerinax - Docker Extension</name>
  <url>https://ballerina.io</url>
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>ballerina/**</exclude>
        </excludes>
      </resource>
      <resource>
        <targetPath>META-INF/</targetPath>
        <directory>${ballerina.source.directory}</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>${jacoco.agent.argLine}</argLine>
          <forkCount>3</forkCount>
          <reuseForks>true</reuseForks>
          <suiteXmlFiles>
            <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
          </suiteXmlFiles>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <goals>
          <goal>report</goal>
        </goals>
        <configuration>
          <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.bsc.maven</groupId>
        <artifactId>maven-processor-plugin</artifactId>
        <version>${mvn.processor.plugin.version}</version>
        <executions>
          <execution>
            <id>process</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>process</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <processors>
            <processor>org.ballerinalang.codegen.BallerinaAnnotationProcessor</processor>
          </processors>
          <options>
            <nativeEntityProviderPackage>org.ballerinalang.net.generated.providers</nativeEntityProviderPackage>
            <nativeEntityProviderClass>StandardNativeElementProvider</nativeEntityProviderClass>
          </options>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.4.3</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createDependencyReducedPom>true</createDependencyReducedPom>
              <minimizeJar>true</minimizeJar>
              <artifactSet>
                <includes>
                  <include>commons-codec:commons-codec</include>
                  <include>commons-io:commons-io</include>
                  <include>com.github.jnr:jnr-unixsocket</include>
                  <include>com.github.jnr:jnr-ffi</include>
                  <include>com.github.jnr:jffi</include>
                  <include>com.github.jnr:jnr-constants</include>
                  <include>com.github.jnr:jnr-enxio</include>
                  <include>com.github.jnr:jnr-posix</include>
                  <include>com.fasterxml.jackson.datatype:jackson-datatype-guava</include>
                  <include>com.fasterxml.jackson.jaxrs:jackson-jaxrs-base</include>
                  <include>com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider</include>
                  <incldue>com.spotify:docker-client</incldue>
                  <inculde>javax.annotation:javax.annotation-api</inculde>
                  <include>javax.ws.rs:javax.ws.rs-api</include>
                  <include>org.apache.commons:commons-compress</include>
                  <include>org.apache.httpcomponents:httpclient</include>
                  <include>org.apache.httpcomponents:httpcore</include>
                  <include>org.ballerinax.docker:docker-generator</include>
                  <include>org.glassfish.hk2:hk2-api</include>
                  <include>org.glassfish.hk2.external:javax.inject</include>
                  <include>org.glassfish.hk2:hk2-locator</include>
                  <include>org.glassfish.hk2:hk2-utils</include>
                  <include>org.glassfish.jersey.bundles.repackaged:jersey-guava</include>
                  <include>org.glassfish.jersey.connectors:jersey-apache-connector</include>
                  <include>org.glassfish.jersey.core:jersey-client</include>
                  <include>org.glassfish.jersey.core:jersey-common</include>
                  <include>org.glassfish.jersey.ext:jersey-entity-filtering</include>
                  <include>org.glassfish.jersey.media:jersey-media-json-jackson</include>
                  <include>org.ow2.asm:asm</include>
                  <include>org.bouncycastle:bcpkix-jdk15on</include>
                  <include>org.bouncycastle:bcprov-jdk15on</include>
                  <include>com.google.guava:guava</include>
                </includes>
                <excludes>
                  <exclude>org.slf4j:slf4j-api</exclude>
                  <exclude>org.slf4j:slf4j-jdk14</exclude>
                  <exclude>org.ballerinalang:ballerina-runtime</exclude>
                  <exclude>com.fasterxml.jackson.dataformat:jackson-dataformat-yaml</exclude>
                  <exclude>com.fasterxml.jackson.core:jackson-databind</exclude>
                  <exclude>com.fasterxml.jackson.core:jackson-annotations</exclude>
                  <exclude>com.fasterxml.jackson.core:jackson-core</exclude>
                  <exclude>commons-lang:commons-lang</exclude>
                  <exclude>org.yaml:snakeyaml</exclude>
                  <exclude>org.ballerinalang:ballerina-lang</exclude>
                  <exclude>org.ballerinalang:ballerina-launcher</exclude>
                  <exclude>org.ballerinalang:ballerina-builtin</exclude>
                  <exclude>org.ballerinalang:ballerina-core</exclude>
                  <exclude>org.ballerinalang:ballerina-mime</exclude>
                  <exclude>org.ballerinalang:ballerina-logging</exclude>
                  <exclude>org.ballerinalang:ballerina-http</exclude>
                  <exclude>org.testng:testng</exclude>
                  <exclude>org.bsc.maven:maven-processor-plugin</exclude>
                  <exclude>org.wso2.msf4j:jaxrs-delegates</exclude>
                </excludes>
              </artifactSet>
              <filters>
                <filter>
                  <artifact>org.glassfish.jersey.core:jersey-client</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>org.glassfish.jersey.core:jersey-common</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>org.glassfish.hk2:hk2-locator</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>org.glassfish.hk2:hk2-utils</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>org.glassfish.hk2:hk2-api</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.github.jnr:jffi</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.github.jnr:jnr-unixsocket</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.github.jnr:jnr-ffi</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.github.jnr:jnr-constants</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.github.jnr:jnr-enxio</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.github.jnr:jnr-posix</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.spotify:docker-client</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.ballerinalang</groupId>
      <artifactId>ballerina-lang</artifactId>
      <version>1.0.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.14.3</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>jcommander</artifactId>
          <groupId>com.beust</groupId>
        </exclusion>
        <exclusion>
          <artifactId>bsh</artifactId>
          <groupId>org.apache-extras.beanshell</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>

