<?xml version='1.0'?>

<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
    license agreements. See the NOTICE file distributed with this work for additional 
    information regarding copyright ownership. The ASF licenses this file to 
    you under the Apache License, Version 2.0 (the "License"); you may not use 
    this file except in compliance with the License. You may obtain a copy of 
    the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
    by applicable law or agreed to in writing, software distributed under the 
    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
    OF ANY KIND, either express or implied. See the License for the specific 
    language governing permissions and limitations under the License. -->

<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.apache.rya</groupId>
        <artifactId>rya.extras</artifactId>
        <version>4.1.0-SNAPSHOT</version>
    </parent>

    <artifactId>rya.indexing</artifactId>
    <name>Apache Rya Secondary Indexing</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.rya</groupId>
            <artifactId>rya.sail</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>hsqldb</artifactId>
                    <groupId>hsqldb</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.rya</groupId>
            <artifactId>accumulo.rya</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.rya</groupId>
            <artifactId>mongodb.rya</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.rya</groupId>
            <artifactId>rya.prospector</artifactId>
        </dependency>

        <!-- Free Text Indexing -->
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-analyzers-common</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>


        <!-- PCJ Indexing -->
        <dependency>
            <groupId>org.apache.rya</groupId>
            <artifactId>rya.indexing.pcj</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.rya</groupId>
            <artifactId>rya.pcj.fluo.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.rya</groupId>
            <artifactId>rya.periodic.notification.api</artifactId>
        </dependency>
        <!-- RDF4J -->
        <dependency>
            <groupId>org.eclipse.rdf4j</groupId>
            <artifactId>rdf4j-queryresultio-text</artifactId>
        </dependency>

        <!--  testing dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.fluo</groupId>
            <artifactId>fluo-mini</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.rya</groupId>
            <artifactId>mongodb.rya</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.rya</groupId>
            <artifactId>rya.test.mongo</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.rya</groupId>
            <artifactId>rya.test.accumulo</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <configuration>
                        <excludes>
                            <!-- RDF data Files -->
                            <exclude>**/*.ttl</exclude>
                            <exclude>**/src/test/resources/rdf_format_files/**</exclude>

                            <!-- Services Files -->
                            <exclude>**/resources/META-INF/services/**</exclude>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <id>map-reduce</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>map-reduce</shadedClassifierName>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                            </transformers>
                            <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>
                    <execution>
                        <id>accumulo-server</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>accumulo-server</shadedClassifierName>
                            <artifactSet>
                                <excludes>
                                    <exclude>org.locationtech.geomesa:*</exclude>
                                    <exclude>mil.nga.giat:*</exclude>
                                    <exclude>scala:*</exclude>
                                    <exclude>org.apache.accumulo:*</exclude>
                                    <exclude>org.apache.thrift:*</exclude>
                                    <exclude>org.apache.hadoop:*</exclude>
                                    <exclude>org.apache.zookeeper:*</exclude>
                                </excludes>
                            </artifactSet>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                            </transformers>
                            <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>
