<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.nuxeo.ecm.distribution</groupId>
    <artifactId>nuxeo-distribution</artifactId>
    <version>6.0-HF17</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <groupId>org.nuxeo</groupId>
  <artifactId>nuxeo-launcher</artifactId>
  <name>Nuxeo multi-OS startup</name>
  <description>Build a Nuxeo launcher working with all Nuxeo products</description>

  <dependencies>
    <dependency>
      <groupId>org.nuxeo.runtime</groupId>
      <artifactId>nuxeo-launcher-commons</artifactId>
    </dependency>
    <dependency>
      <groupId>org.nuxeo.runtime</groupId>
      <artifactId>nuxeo-launcher-commons</artifactId>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>org.nuxeo.runtime</groupId>
      <artifactId>nuxeo-connect-standalone</artifactId>
    </dependency>
    <dependency>
      <groupId>org.nuxeo.shell</groupId>
      <artifactId>nuxeo-shell</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
    </dependency>
    <dependency>
      <groupId>org.nuxeo.connect</groupId>
      <artifactId>nuxeo-connect-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.artofsolving.jodconverter</groupId>
      <artifactId>jodconverter-core</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-vfs2</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <!-- merge services files -->
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"></transformer>
              </transformers>
              <!-- <createDependencyReducedPom>false</createDependencyReducedPom> -->
              <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>jar-with-dependencies</shadedClassifierName>
              <relocations>
                <!-- Relocate org.eclipse.core:org.eclipse.core.jobs -->
                <relocation>
                  <pattern>org/eclipse/core/internal/jobs</pattern>
                  <shadedPattern>hidden/org/eclipse/core/internal/jobs</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org/eclipse/core/runtime/jobs</pattern>
                  <shadedPattern>hidden/org/eclipse/core/runtime/jobs</shadedPattern>
                </relocation>
                <!-- Relocate org.eclipse.equinox:org.eclipse.equinox.common -->
                <relocation>
                  <pattern>org/eclipse/core/internal/boot</pattern>
                  <shadedPattern>hidden/org/eclipse/core/internal/boot</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org/eclipse/core/internal/runtime</pattern>
                  <shadedPattern>hidden/org/eclipse/core/internal/runtime</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org/eclipse/core/runtime</pattern>
                  <shadedPattern>hidden/org/eclipse/core/runtime</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org/eclipse/equinox/events</pattern>
                  <shadedPattern>hidden/org/eclipse/equinox/events</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <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>
</project>