<?xml version="1.0" encoding="UTF-8"?>
<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>

    <!-- Project Coordinates -->
    <groupId>net.i2cat.dataspace</groupId>
    <artifactId>locations-policy</artifactId>
    <version>0.0.2</version>
    <packaging>jar</packaging>

    <!-- Project Information -->
    <name>Policies extension</name>
    <description>Extension included to enforce temporal and regional policies</description>
    <url>http://www.example.com/example-application</url>

    <!-- Project Metadata -->
    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <!-- Repositories -->
    <repositories>
        <repository>
            <id>eclipse-edc</id>
            <name>Eclipse EDC Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>maven-central</id>
            <name>Maven Central</name>
            <url>https://repo1.maven.org/maven2/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <!-- Plugin Repositories -->
    <pluginRepositories>
        <pluginRepository>
            <id>eclipse-edc</id>
            <name>Eclipse EDC Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </pluginRepository>
    </pluginRepositories>

    <!-- Dependencies -->
    <dependencies>
        <!-- SPI modules -->
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>identity-did-spi</artifactId>
            <version>0.10.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>federated-catalog-spi</artifactId>
            <version>0.10.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>core-spi</artifactId>
            <version>0.10.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>policy-spi</artifactId>
            <version>0.10.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>contract-spi</artifactId>
            <version>0.10.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>transfer-spi</artifactId>
            <version>0.10.0</version>
        </dependency>

        <!-- JSON-LD -->
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>json-ld</artifactId>
            <version>0.10.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>json-ld-spi</artifactId>
            <version>0.10.0</version>
        </dependency>

        <!-- Core connector and policy engine -->
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>connector-core</artifactId>
            <version>0.10.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>policy-engine-spi</artifactId>
            <version>0.10.0</version>
        </dependency>

        <!-- Runtime-only (optional) -->
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>federated-catalog-core</artifactId>
            <version>0.10.0</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.edc</groupId>
            <artifactId>federated-catalog-api</artifactId>
            <version>0.10.0</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <!-- Developers -->
    <developers>
        <developer>
            <id>i2cat</id>
            <name>I2CAT</name>
            <email>espaisdedades@i2cat.net</email>
        </developer>
    </developers>

    <!-- SCM -->
    <scm>
        <connection>scm:git:git@gitlab.i2cat.net:rdprojects/retech/retech_edc/i2cat/extensions/locations-policy.git</connection>
        <developerConnection>scm:git:ssh://git@gitlab.i2cat.net:rdprojects/retech/retech_edc/i2cat/extensions/locations-policy.git</developerConnection>
        <url>https://gitlab.i2cat.net/rdprojects/retech/retech_edc/i2cat/extensions/locations-policy</url>
    </scm>

    <!-- Properties -->
    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <!-- Build Plugins -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.5.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>