<?xml version="1.0" encoding="UTF-8"?>
<!--
/*************************************************************************
 *
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  Copyright 2014 Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 **************************************************************************/
-->
<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>com.adobe.granite</groupId>
      <artifactId>parent</artifactId>
      <version>80</version>
      <relativePath />
   </parent>
   <artifactId>crx2oak</artifactId>
   <name>CRX to Oak repository migration tool</name>
   <version>1.10.0</version>
   <scm>
      <connection>scm:git:git@git.corp.adobe.com:Granite/crx2oak.git</connection>
      <developerConnection>scm:git:git@git.corp.adobe.com:Granite/crx2oak.git</developerConnection>
      <url>https://git.corp.adobe.com/Granite/crx2oak/tree/master</url>
      <tag>crx2oak-1.10.0</tag>
   </scm>
   <properties>
      <oak.version>1.10.1</oak.version>
      <crx.version>2.6.6</crx.version>
      <segment.tar.version>${oak.version}</segment.tar.version>
      <granite.impl.version>1.4.80</granite.impl.version>
      <granite.java.version>7</granite.java.version>
      <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss.SSSZ</maven.build.timestamp.format>
   </properties>
   <distributionManagement>
      <snapshotRepository>
         <id>ossrh</id>
         <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      </snapshotRepository>
      <repository>
         <id>ossrh</id>
         <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
      </repository>
   </distributionManagement>
   <build>
      <plugins>
         <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <argLine>-Xmx1g ${argLine}</argLine>
               <systemPropertyVariables>
                  <s3.properties>${s3.properties}</s3.properties>
               </systemPropertyVariables>
               <useFile>false</useFile>
               <includes>
                  <include>**/*Spec.java</include>
                  <include>**/*Test.java</include>
               </includes>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>2.1</version>
            <executions>
               <execution>
                  <phase>package</phase>
                  <goals>
                     <goal>shade</goal>
                  </goals>
                  <configuration>
                     <artifactSet>
                        <excludes>
                           <exclude>org.slf4j:slf4j-simple</exclude>
                           <exclude>log4j:log4j:jar:</exclude>
                        </excludes>
                     </artifactSet>
                     <createDependencyReducedPom>false</createDependencyReducedPom>
                     <filters>
                        <filter>
                           <artifact>*</artifact>
                           <excludes>
                              <exclude>META-INF/*.SF</exclude>
                              <exclude>META-INF/*.DSA</exclude>
                              <exclude>META-INF/*.RSA</exclude>
                              <exclude>hsqlServlet.class</exclude>
                              <exclude>logback*.xml</exclude>
                              <exclude>azure-keyvault-core-0.9.7.jar</exclude>
                              <exclude>azure-storage-5.0.0.jar</exclude>
                              <exclude>OSGI-INF/*</exclude>
                              <exclude>concurrentlinkedhashmap-lru-1.4.2.jar</exclude>
                              <exclude>models/*</exclude>
                              <exclude>software/amazon/ion/*</exclude>
                           </excludes>
                        </filter>
                        <filter>
                           <artifact>com.day.crx:crx-ext-s3</artifact>
                        </filter>
                        <filter>
                           <artifact>com.day.crx:crx-core</artifact>
                           <includes>
                              <include>com/day/crx/**</include>
                              <include>com/day/jackrabbit/**</include>
                           </includes>
                        </filter>
                        <filter>
                           <artifact>org.springframework:spring-core</artifact>
                           <includes>
                              <include>org/springframework/core/io/**</include>
                              <include>org/springframework/util/**</include>
                              <include>org/springframework/core/*.class</include>
                           </includes>
                        </filter>
                        <filter>
                           <artifact>com.adobe.granite:com.adobe.granite.repository</artifact>
                           <excludes>
                              <exclude>com/day/crx/core/cluster/ClusterNodeInfo.class</exclude>
                              <exclude>org/apache/jackrabbit/oak/plugins/document/bundlor/*.class</exclude>
                           </excludes>
                        </filter>
                        <filter>
                           <artifact>org.apache.jackrabbit:oak-upgrade</artifact>
                           <excludes>
                              <exclude>org/apache/commons/io/**</exclude>
                              <exclude>org/apache/lucene/**</exclude>
                              <exclude>org/apache/jackrabbit/oak/backup/**</exclude>
                              <exclude>ch/qos/logback/classic/**</exclude>
                              <exclude>org/slf4j/**</exclude>
                              <exclude>com/google/common/**</exclude>
                              <exclude>org/apache/commons/logging/**</exclude>
                              <exclude>ch/qos/logback/core/**</exclude>
                           </excludes>
                        </filter>
                        <filter>
                           <artifact>org.apache.jackrabbit:oak-lucene</artifact>
                           <excludes>
                              <exclude>org/apache/lucene/**</exclude>
                              <exclude>org/apache/jackrabbit/oak/cache/CacheStats.class</exclude>
                              <exclude>org/apache/jackrabbit/oak/cache/AbstractCacheStats.class</exclude>
                           </excludes>
                        </filter>
                     </filters>
                     <transformers>
                        <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                           <mainClass>com.adobe.granite.crx2oak.CRX2Oak</mainClass>
                        </transformer>
                        <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                           <file>src/main/resources/logback.xml</file>
                           <resource>logback.xml</resource>
                        </transformer>
                     </transformers>
                     <shadedArtifactAttached>true</shadedArtifactAttached>
                     <shadedClassifierName>all-in-one</shadedClassifierName>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
               <execution>
                  <phase>package</phase>
                  <goals>
                     <goal>run</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>animal-sniffer-maven-plugin</artifactId>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
               <archive>
                  <manifest>
                     <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                     <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                  </manifest>
                  <manifestEntries>
                     <Build-Date>${maven.build.timestamp}</Build-Date>
                  </manifestEntries>
               </archive>
            </configuration>
         </plugin>
         <plugin>
            <!-- The gmavenplus plugin is used to compile Groovy code. -->
            <groupId>org.codehaus.gmavenplus</groupId>
            <artifactId>gmavenplus-plugin</artifactId>
            <version>1.4</version>
            <executions>
               <execution>
                  <goals>
                     <goal>compile</goal>
                     <goal>testCompile</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.7.7.201606060606</version>
            <configuration>
               <destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
               <dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
            </configuration>
            <executions>
               <execution>
                  <id>jacoco-initialize</id>
                  <goals>
                     <goal>prepare-agent</goal>
                  </goals>
               </execution>
               <execution>
                  <id>jacoco-site</id>
                  <phase>package</phase>
                  <goals>
                     <goal>report</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.1</version>
            <executions>
               <execution>
                  <id>attach-sources</id>
                  <goals>
                     <goal>jar-no-fork</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9.1</version>
            <configuration>
               <classifier>all-in-one</classifier>
            </configuration>
            <executions>
               <execution>
                  <id>attach-javadocs</id>
                  <goals>
                     <goal>jar</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
               <execution>
                  <id>sign-artifacts</id>
                  <phase>verify</phase>
                  <goals>
                     <goal>sign</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>
   <dependencies>
      <!-- sling - runmode detection -->
      <dependency>
         <groupId>org.apache.sling</groupId>
         <artifactId>org.apache.sling.settings</artifactId>
         <version>1.3.6</version>
         <exclusions>
            <exclusion>
               <groupId>*</groupId>
               <artifactId>*</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>commons-io</groupId>
         <artifactId>commons-io</artifactId>
         <version>2.5</version>
      </dependency>
      <!-- lucene -->
      <dependency>
         <groupId>org.apache.lucene</groupId>
         <artifactId>lucene-core</artifactId>
         <version>3.6.0</version>
         <exclusions>
            <exclusion>
               <groupId>*</groupId>
               <artifactId>*</artifactId>
            </exclusion>
            <exclusion>
               <groupId>commons-io</groupId>
               <artifactId>commons-io</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.apache.jackrabbit</groupId>
         <artifactId>oak-jcr</artifactId>
         <version>${oak.version}</version>
         <exclusions>
            <exclusion>
               <groupId>*</groupId>
               <artifactId>*</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.apache.jackrabbit</groupId>
         <artifactId>oak-lucene</artifactId>
         <version>${oak.version}</version>
         <exclusions>
            <exclusion>
               <groupId>*</groupId>
               <artifactId>*</artifactId>
            </exclusion>
            <exclusion>
               <groupId>ch.qos.logback</groupId>
               <artifactId>logback-classic</artifactId>
            </exclusion>
            <exclusion>
               <groupId>ch.qos.logback</groupId>
               <artifactId>logback-core</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-api</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-simple</artifactId>
            </exclusion>
            <exclusion>
               <groupId>commons-io</groupId>
               <artifactId>commons-io</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.apache.jackrabbit</groupId>
         <artifactId>oak-upgrade</artifactId>
         <version>${oak.version}</version>
         <exclusions>
            <exclusion>
               <groupId>*</groupId>
               <artifactId>*</artifactId>
            </exclusion>
            <exclusion>
               <groupId>ch.qos.logback</groupId>
               <artifactId>logback-classic</artifactId>
            </exclusion>
            <exclusion>
               <groupId>ch.qos.logback</groupId>
               <artifactId>logback-core</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-api</artifactId>
            </exclusion>
            <exclusion>
               <groupId>com.google.guava</groupId>
               <artifactId>guava</artifactId>
            </exclusion>
            <exclusion>
               <groupId>commons-logging</groupId>
               <artifactId>commons-logging</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.jackrabbit</groupId>
               <artifactId>oak-core-spi</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.jackrabbit</groupId>
               <artifactId>oak-core-lucene</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <!-- Common libraries -->
      <dependency>
         <groupId>org.jsoup</groupId>
         <artifactId>jsoup</artifactId>
         <version>1.11.3</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>com.google.guava</groupId>
         <artifactId>guava</artifactId>
         <version>20.0</version>
      </dependency>
      <!-- Logging API -->
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
         <version>1.7.21</version>
         <scope>compile</scope>
      </dependency>
      <!-- Logging implementation: necessary for logging redirection -->
      <dependency>
         <groupId>ch.qos.logback</groupId>
         <artifactId>logback-classic</artifactId>
         <version>1.2.3</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>ch.qos.logback</groupId>
         <artifactId>logback-core</artifactId>
         <version>1.2.3</version>
         <scope>compile</scope>
      </dependency>
      <!-- CRX2 -->
      <dependency>
         <groupId>com.day.crx</groupId>
         <artifactId>crx-core</artifactId>
         <version>${crx.version}</version>
         <exclusions>
            <exclusion>
               <groupId>org.apache.jackrabbit</groupId>
               <artifactId>jackrabbit-api</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.jackrabbit</groupId>
               <artifactId>jackrabbit-spi</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.jackrabbit</groupId>
               <artifactId>jackrabbit-jcr-commons</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.jackrabbit</groupId>
               <artifactId>jackrabbit-spi-commons</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.jackrabbit</groupId>
               <artifactId>jackrabbit-core</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.jackrabbit</groupId>
               <artifactId>*</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.lucene</groupId>
               <artifactId>lucene-core</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.tika</groupId>
               <artifactId>tika-core</artifactId>
            </exclusion>
            <exclusion>
               <groupId>commons-collections</groupId>
               <artifactId>commons-collections</artifactId>
            </exclusion>
            <exclusion>
               <groupId>commons-io</groupId>
               <artifactId>commons-io</artifactId>
            </exclusion>
            <exclusion>
               <groupId>concurrent</groupId>
               <artifactId>concurrent</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <!-- CRX2: Support for S3 repositories -->
      <dependency>
         <groupId>com.day.crx</groupId>
         <artifactId>crx-ext-s3</artifactId>
         <version>1.0.50</version>
         <exclusions>
            <exclusion>
               <groupId>*</groupId>
               <artifactId>*</artifactId>
            </exclusion>
            <exclusion>
               <groupId>com.amazonaws</groupId>
               <artifactId>aws-java-sdk-s3</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.jackrabbit</groupId>
               <artifactId>jackrabbit-data</artifactId>
            </exclusion>
            <exclusion>
               <groupId>com.amazonaws</groupId>
               <artifactId>aws-java-sdk-core</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <!-- Granite & OSGI -->
      <dependency>
         <groupId>com.adobe.granite</groupId>
         <artifactId>com.adobe.granite.repository</artifactId>
         <version>${granite.impl.version}</version>
      </dependency>
      <dependency>
         <groupId>org.mapdb</groupId>
         <artifactId>mapdb</artifactId>
         <version>1.0.6</version>
      </dependency>
      <dependency>
         <groupId>org.osgi</groupId>
         <artifactId>org.osgi.core</artifactId>
         <scope>compile</scope>
      </dependency>
      <!-- Reading classpath resources (including jar files) -->
      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-core</artifactId>
         <version>5.1.5.RELEASE</version>
      </dependency>
      <!-- Testing: JUnit -->
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <scope>test</scope>
      </dependency>
      <!-- Testing: Spock tests -->
      <dependency>
         <groupId>org.spockframework</groupId>
         <artifactId>spock-core</artifactId>
         <version>1.0-groovy-2.4</version>
         <scope>test</scope>
      </dependency>
      <!-- Specific Groovy version that needs to match
             with MAJOR.MINOR with spock-core -->
      <dependency>
         <groupId>org.codehaus.groovy</groupId>
         <artifactId>groovy-all</artifactId>
         <version>2.4.1</version>
         <scope>test</scope>
      </dependency>
      <!-- enables mocking of classes (in addition to interfaces) -->
      <dependency>
         <groupId>cglib</groupId>
         <artifactId>cglib-nodep</artifactId>
         <version>3.2.4</version>
         <scope>test</scope>
      </dependency>
      <!-- enables mocking of classes without default constructor
            (together with CGLIB) -->
      <dependency>
         <groupId>org.objenesis</groupId>
         <artifactId>objenesis</artifactId>
         <version>2.4</version>
         <scope>test</scope>
      </dependency>
      <!-- Simpler syntax for Java -->
      <dependency>
         <groupId>org.projectlombok</groupId>
         <artifactId>lombok</artifactId>
         <version>1.16.10</version>
         <scope>provided</scope>
      </dependency>
   </dependencies>
</project>