<?xml version="1.0"?>
<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.neo4j</groupId>
        <artifactId>cypher-shell-parent</artifactId>
        <version>4.3.21</version>
    </parent>

    <artifactId>cypher-shell</artifactId>
    <version>4.3.21</version>
    <packaging>jar</packaging>
    <name>Neo4j - Cypher Shell</name>
    <description>Cypher Shell</description>
    <url>http://components.neo4j.org/${project.artifactId}/${project.version}</url>

    <properties>
        <license-text.header>headers/GPL-3-header.txt</license-text.header>
        <moduleName>org.neo4j.cypher.internal.compiler</moduleName>
    </properties>

    <scm>
        <connection>scm:git:git://github.com/neo4j/neo4j.git</connection>
        <developerConnection>scm:git:git@github.com:neo4j/neo4j.git</developerConnection>
        <url>https://github.com/neo4j/neo4j</url>
    </scm>

    <licenses>
        <license>
            <name>GNU General Public License, Version 3</name>
            <url>http://www.gnu.org/licenses/gpl-3.0-standalone.html</url>
            <comments>
                The software ("Software") developed and owned by Network Engine for
                Objects in Lund AB (referred to in this notice as "Neo Technology") is
                licensed under the GNU GENERAL PUBLIC LICENSE Version 3 to all third
                parties and that license is included below.

                However, if you have executed an End User Software License and Services
                Agreement or an OEM Software License and Support Services Agreement, or
                another commercial license agreement with Neo Technology or one of its
                affiliates (each, a "Commercial Agreement"), the terms of the license in
                such Commercial Agreement will supersede the GNU GENERAL PUBLIC LICENSE
                Version 3 and you may use the Software solely pursuant to the terms of
                the relevant Commercial Agreement.
            </comments>
        </license>
    </licenses>

    <dependencies>


        <!-- Neo4j dependencies -->

        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-cypher-expression-evaluator</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-index</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-lucene-upgrade</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-lucene-index</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-ssl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-graph-algo</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-io</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-csv</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-configuration</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-collections</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-diagnostics</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-resource</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-annotation-processors</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-spatial-index</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-native</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-procedure-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.logging.log4j</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.lucene</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.neo4j.driver</groupId>
            <artifactId>neo4j-java-driver</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>cypher-literal-interpreter</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-cypher-javacc-parser</artifactId>
            <version>${project.version}</version>
        </dependency>


        <!-- Other dependencies -->

        <dependency>
            <groupId>net.sourceforge.argparse4j</groupId>
            <artifactId>argparse4j</artifactId>
            <version>0.8.1</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>annotations</artifactId>
            <version>${findbugs.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.fusesource.jansi</groupId>
            <artifactId>jansi</artifactId>
            <version>1.13</version>
        </dependency>
        <dependency>
            <groupId>jline</groupId>
            <artifactId>jline</artifactId>
            <version>2.14.6</version>
            <exclusions>
                <exclusion>
                    <artifactId>junit</artifactId>
                    <groupId>junit</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-rules</artifactId>
            <version>1.19.0</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>build.properties</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <finalName>cypher-shell-distribution-${project.version}</finalName>
                            <minimizeJar>true</minimizeJar>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>org.neo4j.shell.Main</mainClass>
                                    <manifestEntries>
                                        <!-- Hide 'An illegal reflective access...' warnings from org.neo4j.memory.RuntimeInternals -->
                                        <Add-Opens>java.base/java.lang java.base/java.nio java.base/sun.nio.ch</Add-Opens>
                                    </manifestEntries>
                                </transformer>
                            </transformers>
                            <filters>
                                <filter>
                                    <!--
                                        Shading signded JARs will fail without this.
                                        http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
                                    -->
                                    <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>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/assembly/zip.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


</project>
