<?xml version="1.0" encoding="UTF-8"?>
<!--
  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</groupId>
        <artifactId>apache</artifactId>
        <version>23</version>
    </parent>

    <groupId>org.apache.paimon</groupId>
    <artifactId>mosaic</artifactId>
    <version>0.3.0</version>
    <packaging>jar</packaging>

    <name>Mosaic</name>
    <description>Mosaic file format for Java (backed by Rust via JNI)</description>
    <url>https://paimon.apache.org</url>
    <inceptionYear>2026</inceptionYear>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/apache/paimon-mosaic</url>
        <connection>git@github.com:apache/paimon-mosaic.git</connection>
        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/paimon-mosaic.git</developerConnection>
    </scm>

    <developers>
        <developer>
            <name>Apache Paimon Contributors</name>
            <email>dev@paimon.apache.org</email>
            <organization>Apache Software Foundation</organization>
            <organizationUrl>https://www.apache.org</organizationUrl>
        </developer>
    </developers>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <!-- Used by maven-remote-resources-plugin when generating META-INF/NOTICE. -->
        <project.build.outputTimestamp>2026-01-01T00:00:00Z</project.build.outputTimestamp>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <arrow.version>15.0.0</arrow.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.arrow</groupId>
                <artifactId>arrow-bom</artifactId>
                <version>${arrow.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.arrow</groupId>
            <artifactId>arrow-vector</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.arrow</groupId>
            <artifactId>arrow-memory-netty</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.arrow</groupId>
            <artifactId>arrow-c-data</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <properties>
                <gpg.skip>false</gpg.skip>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <version>3.3.1</version>
                        <executions>
                            <execution>
                                <id>copy-binary-legal-resources</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                                    <overwrite>true</overwrite>
                                    <resources>
                                        <resource>
                                            <directory>${project.basedir}/..</directory>
                                            <targetPath>META-INF</targetPath>
                                            <filtering>false</filtering>
                                            <includes>
                                                <include>LICENSE-binary</include>
                                            </includes>
                                        </resource>
                                        <resource>
                                            <directory>src/main/binary-resources</directory>
                                            <filtering>false</filtering>
                                            <includes>
                                                <include>META-INF/LICENSE</include>
                                                <include>META-INF/NOTICE</include>
                                            </includes>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <bestPractices>true</bestPractices>
                                    <ascDirectory>${project.build.directory}</ascDirectory>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>verify-signed-release-artifacts</id>
                                <phase>verify</phase>
                                <goals><goal>run</goal></goals>
                                <configuration>
                                    <skip>${gpg.skip}</skip>
                                    <target>
                                        <exec executable="python3" failonerror="true">
                                            <arg value="${project.basedir}/../tools/verify_binary_artifact.py"/>
                                            <arg value="--jar"/>
                                            <arg value="${project.build.directory}/${project.build.finalName}.jar"/>
                                            <arg value="--sources-jar"/>
                                            <arg value="${project.build.directory}/${project.build.finalName}-sources.jar"/>
                                            <arg value="--javadoc-jar"/>
                                            <arg value="${project.build.directory}/${project.build.finalName}-javadoc.jar"/>
                                        </exec>
                                        <exec executable="python3" failonerror="true">
                                            <arg value="${project.basedir}/../tools/release_checks.py"/>
                                            <arg value="signatures"/>
                                            <arg value="--gpg-executable"/><arg value="${gpg.executable}"/>
                                            <arg value="--gpg-home"/><arg value="${gpg.homedir}"/>
                                            <arg value="--signed-file"/>
                                            <arg value="${project.build.directory}/${project.build.finalName}.pom.asc"/>
                                            <arg value="${project.basedir}/pom.xml"/>
                                            <arg value="--signed-file"/>
                                            <arg value="${project.build.directory}/${project.build.finalName}.jar.asc"/>
                                            <arg value="${project.build.directory}/${project.build.finalName}.jar"/>
                                            <arg value="--signed-file"/>
                                            <arg value="${project.build.directory}/${project.build.finalName}-sources.jar.asc"/>
                                            <arg value="${project.build.directory}/${project.build.finalName}-sources.jar"/>
                                            <arg value="--signed-file"/>
                                            <arg value="${project.build.directory}/${project.build.finalName}-javadoc.jar.asc"/>
                                            <arg value="${project.build.directory}/${project.build.finalName}-javadoc.jar"/>
                                        </exec>
                                    </target>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <excludes>
                                <exclude>native/**</exclude>
                                <exclude>LICENSE-binary</exclude>
                                <exclude>**/LICENSE-binary</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.6.3</version>
                        <configuration>
                            <quiet>true</quiet>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>enforce-maven</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireJavaVersion>
                                            <version>[1.8,1.9)</version>
                                        </requireJavaVersion>
                                        <requireMavenVersion>
                                            <version>[3.1.1,)</version>
                                        </requireMavenVersion>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.7.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>apache.releases.https</serverId>
                            <nexusUrl>https://repository.apache.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
