<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">

    <groupId>io.github.eduramiba</groupId>
    <artifactId>onnxruntime-directml</artifactId>
    <version>1.26.0</version>
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>

    <name>ONNX Runtime DirectML Java</name>
    <description>ONNX Runtime Java artifact built with DirectML support for Windows x64. Bundles the official ONNX Runtime Java API classes alongside native DLLs compiled with --use_dml.</description>
    <url>https://github.com/eduramiba/onnxruntime-java-directml-builder</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://github.com/eduramiba/onnxruntime-java-directml-builder/blob/main/LICENSE</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/eduramiba/onnxruntime-java-directml-builder.git</connection>
        <developerConnection>scm:git:git@github.com:eduramiba/onnxruntime-java-directml-builder.git</developerConnection>
        <url>https://github.com/eduramiba/onnxruntime-java-directml-builder</url>
    </scm>

    <developers>
        <developer>
            <id>eduramiba</id>
            <name>Eduardo Ramos</name>
            <email>eduramiba@gmail.com</email>
        </developer>
    </developers>

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

        <ort.build-helper-maven-plugin.version>3.6.1</ort.build-helper-maven-plugin.version>
        <ort.central-publishing-maven-plugin.version>0.10.0</ort.central-publishing-maven-plugin.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${ort.build-helper-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>${ort.central-publishing-maven-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-dist-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>dist/${project.version}/onnxruntime.jar</file>
                                    <type>jar</type>
                                </artifact>
                                <artifact>
                                    <file>dist/${project.version}/onnxruntime-sources.jar</file>
                                    <type>jar</type>
                                    <classifier>sources</classifier>
                                </artifact>
                                <artifact>
                                    <file>dist/${project.version}/onnxruntime-javadoc.jar</file>
                                    <type>jar</type>
                                    <classifier>javadoc</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>deployment</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>false</autoPublish>
                            <deploymentName>${project.version}</deploymentName>
                            <ignorePublishedComponents>true</ignorePublishedComponents>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <name>Central Portal Snapshots</name>
            <id>central-portal-snapshots</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
</project>
