<!--

    Copyright © Red Gate Software Ltd 2010-2020

    Licensed 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.flywaydb</groupId>
        <artifactId>flyway-parent</artifactId>
        <version>7.3.2</version>
    </parent>
    <artifactId>flyway-commandline</artifactId>
    <packaging>jar</packaging>
    <name>${project.artifactId}</name>
    <properties>



    </properties>
    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>flyway-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derbytools</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derbyshared</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derbyclient</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
        </dependency>
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.cloud</groupId>
            <artifactId>google-cloud-spanner-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.jtds</groupId>
            <artifactId>jtds</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <!-- #2136: JNA is required for MariaDB with unix sockets -->
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
        </dependency>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna-platform</artifactId>
        </dependency>
        <dependency>
            <groupId>org.firebirdsql.jdbc</groupId>
            <artifactId>jaybird-jdk18</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mariadb.jdbc</groupId>
            <artifactId>mariadb-java-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
        </dependency>
        <dependency>
            <groupId>net.snowflake</groupId>
            <artifactId>snowflake-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.fusesource.jansi</groupId>
            <artifactId>jansi</artifactId>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>s3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.cloud</groupId>
            <artifactId>google-cloud-storage</artifactId>
        </dependency>
        <dependency>
            <groupId>com.amazonaws.secretsmanager</groupId>
            <artifactId>aws-secretsmanager-jdbc</artifactId>
            <optional>true</optional>
        </dependency>


















    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-license</id>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>..</directory>
                                    <includes>
                                        <include>LICENSE.txt</include>
                                        <include>README.txt</include>
                                    </includes>
                                </resource>
                            </resources>
                            <outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
                        </configuration>
                    </execution>

















                </executions>
            </plugin>








        </plugins>
    </build>
    <profiles>
        <!-- Not needed until the default for Command-line becomes Java 9 or until Microsoft fixes their JDBC driver -->
        <!--
        <profile>
            <id>jdk9</id>
            <activation>
                <jdk>9</jdk>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>javax.xml.bind</groupId>
                    <artifactId>jaxb-api</artifactId>
                </dependency>
            </dependencies>
        </profile>
        -->
        <profile>
            <id>build-assemblies</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>net.adoptopenjdk</groupId>
                    <artifactId>jre</artifactId>
                    <classifier>windows-x64</classifier>
                    <type>zip</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>net.adoptopenjdk</groupId>
                    <artifactId>jre</artifactId>
                    <classifier>linux-x64</classifier>
                    <type>tar.gz</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>net.adoptopenjdk</groupId>
                    <artifactId>jre</artifactId>
                    <classifier>macos-x64</classifier>
                    <type>tar.gz</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>com.oracle.database.jdbc</groupId>
                    <artifactId>ojdbc8</artifactId>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unpack-jres</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>unpack-dependencies</goal>
                                </goals>
                                <configuration>
                                    <ignorePermissions>true</ignorePermissions>
                                    <includeArtifactIds>jre</includeArtifactIds>
                                    <stripVersion>true</stripVersion>
                                    <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
                                </configuration>
                            </execution>

                            <execution>
                                <id>copy-editions</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>copy</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>org.flywaydb.enterprise</groupId>
                                            <artifactId>flyway-commandline</artifactId>
                                            <version>${project.version}</version>
                                            <type>jar</type>
                                            <outputDirectory>${project.build.directory}/editions/enterprise</outputDirectory>
                                        </artifactItem>
                                        <artifactItem>
                                            <groupId>org.flywaydb.enterprise</groupId>
                                            <artifactId>flyway-core</artifactId>
                                            <version>${project.version}</version>
                                            <type>jar</type>
                                            <outputDirectory>${project.build.directory}/editions/enterprise</outputDirectory>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>














                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>nojre-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <descriptors>
                                        <descriptor>src/main/assembly/no-jre.xml</descriptor>
                                    </descriptors>
                                    <appendAssemblyId>false</appendAssemblyId>
                                </configuration>
                            </execution>
                            <execution>
                                <id>jre-assemblies</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <descriptors>
                                        <descriptor>src/main/assembly/windows.xml</descriptor>
                                        <descriptor>src/main/assembly/linux.xml</descriptor>
                                        <descriptor>src/main/assembly/macos.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <encoding>UTF-8</encoding>
                        </configuration>
                    </plugin>






























                </plugins>
            </build>
        </profile>
    </profiles>
</project>