<?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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.jenkins-ci</groupId>
        <artifactId>jenkins</artifactId>
        <version>1.46</version>
        <relativePath />
    </parent>

    <artifactId>swarm-client</artifactId>
    <groupId>org.jenkins-ci.plugins</groupId>
    <packaging>jar</packaging>
    <name>Jenkins Swarm Plugin Client</name>
    <version>3.13</version>

    <properties>
      <java.level>8</java.level>
    </properties>

    <build>
      <finalName>${project.artifactId}</finalName>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.1.1</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>shade</goal>
              </goals>
              <configuration>
                <createDependencyReducedPom>false</createDependencyReducedPom>
                <filters>
                  <filter>
                    <artifact>*:*</artifact>
                    <excludes>
                      <exclude>META-INF/*.SF</exclude>
                      <exclude>META-INF/*.DSA</exclude>
                      <exclude>META-INF/*.RSA</exclude>
                    </excludes>
                  </filter>
                </filters>
                <relocations>
                  <!-- Be ware! there is org.xxx class in the fwk, do not relocate them! -->
                  <!-- hudson remoting seems to check some class also, so cannot be shaded -->
                  <relocation>
                    <pattern>org.apache</pattern>
                    <shadedPattern>shaded.org.apache</shadedPattern>
                  </relocation>
                  <relocation>
                    <pattern>org.slf4j</pattern>
                    <shadedPattern>shaded.org.slf4j</shadedPattern>
                  </relocation>
                </relocations>
                <transformers>
                  <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                    <manifestEntries>
                      <Main-Class>hudson.plugins.swarm.Client</Main-Class>
                    </manifestEntries>
                  </transformer>
                </transformers>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </build>
    <dependencies>
      <!-- these dependencies need to be explicitly defined so that
           they make it into uberjar (the compilation would pass
           without these because we inherit them from ancestor POM.)
      -->
      <dependency>
        <groupId>args4j</groupId>
        <artifactId>args4j</artifactId>
        <version>2.0.31</version>
      </dependency>
      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.1.1</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>1.7.22</version>
      </dependency>
      <dependency>
        <groupId>org.jenkins-ci.main</groupId>
        <artifactId>remoting</artifactId>
        <version>3.21</version>
      </dependency>
      <dependency>
        <groupId>commons-httpclient</groupId>
        <artifactId>commons-httpclient</artifactId>
        <version>3.1</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.9</version>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
      </dependency>
      <dependency>
          <groupId>com.google.code.findbugs</groupId>
          <artifactId>annotations</artifactId>
          <version>3.0.1</version>
          <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>com.google.code.findbugs</groupId>
          <artifactId>jsr305</artifactId>
          <version>3.0.1</version>
          <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.12</version>
          <scope>test</scope>
      </dependency>
    </dependencies>

  <scm>
    <tag>swarm-plugin-3.13</tag>
  </scm>
</project>
