<!--

    Copyright (C) Red Gate Software Ltd 2010-2024

    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">
    <parent>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-parent</artifactId>
        <version>11.9.0</version>
        <relativePath/>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>flyway-community-db-support</artifactId>
    <packaging>pom</packaging>
    <version>10.24.0</version>
    <name>${project.artifactId}</name>

    <modules>
        <module>flyway-database-tidb</module>
        <module>flyway-database-ignite</module>
        <module>flyway-database-yugabytedb</module>
        <module>flyway-database-cubrid</module>
        <module>flyway-database-clickhouse</module>
        <module>flyway-database-oceanbase</module>
        <module>flyway-database-databricks</module>
        <module>flyway-database-db2zos</module>
        <module>flyway-database-duckdb</module>
        <module>flyway-community-db-support-archetype</module>
        <module>flyway-database-timeplus</module>
        <module>flyway-database-questdb</module>
        <module>flyway-database-iris</module>
    </modules>

    <properties>
        <version.flyway>11.9.0</version.flyway>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>flyway-core</artifactId>
                <version>${version.flyway}</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.10</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <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>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>bundle-manifest</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>manifest</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.4.0</version>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <inceptionYear>2010</inceptionYear>
                    <organizationName>Red Gate Software Ltd</organizationName>
                    <licenseName>apache_v2</licenseName>
                    <extraFiles>
                        <DockerFile>properties</DockerFile>
                    </extraFiles>
                    <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                    <processStartTag>========================LICENSE_START=================================</processStartTag>
                    <processEndTag>=========================LICENSE_END==================================</processEndTag>
                    <sectionDelimiter>========================================================================</sectionDelimiter>
                    <excludes>
                        <exclude>LICENSE</exclude>
                        <exclude>**/build/**</exclude>
                        <exclude>**/src/test/**</exclude>
                        <exclude>.idea/**</exclude>
                        <exclude>**/*.sh</exclude>
                        <exclude>**/*.txt</exclude>
                        <exclude>**/*.cnf</exclude>
                        <exclude>**/*.conf</exclude>
                        <exclude>**/*.releaseBackup</exclude>
                        <exclude>**/*.nofilter</exclude>
                        <exclude>**/*.ini</exclude>
                        <exclude>**/*.md</exclude>
                        <exclude>**/*.ids</exclude>
                        <exclude>**/*.ipr</exclude>
                        <exclude>**/*.iws</exclude>
                        <exclude>**/*.bin</exclude>
                        <exclude>**/*.lock</exclude>
                        <exclude>**/*.gradle</exclude>
                        <exclude>**/*.sbt</exclude>
                        <exclude>**/gradlew</exclude>
                        <exclude>.gitignore</exclude>
                        <exclude>.gitattributes</exclude>
                        <exclude>.travis.yml</exclude>
                        <exclude>**/flyway</exclude>
                        <exclude>**/*_BOM.sql</exclude>
                        <exclude>**/assets/report/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>github</id>
            <properties>
                <skipTests>true</skipTests>
            </properties>
            <distributionManagement>
                <repository>
                    <id>github</id>
                    <url>https://maven.pkg.github.com/flyway/flyway-community-db-support</url>
                </repository>
                <snapshotRepository>
                    <id>github</id>
                    <url>https://maven.pkg.github.com/flyway/flyway-community-db-support</url>
                </snapshotRepository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.8.0</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>injected-central-publishing</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
