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

    <parent>
        <groupId>xyz.derivora</groupId>
        <artifactId>derivora-properties</artifactId>
        <version>0.1.0</version>
    </parent>

    <artifactId>derivora-properties-starter</artifactId>
    <version>0.1.0</version>
    <packaging>jar</packaging>

    <name>Derivora Properties Starter</name>
    <description>
        A Java module that simplifies connecting dependencies of the DerivoraProperties ecosystem.
    </description>
    <inceptionYear>2025</inceptionYear>
    <url>https://gitlab.com/derivora/derivora-properties/derivora-properties-starter</url>

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

    <scm>
        <connection>scm:git:https://gitlab.com/derivora/derivora-properties/derivora-properties-starter.git</connection>
        <developerConnection>
            scm:git:ssh://gitlab.com/derivora/derivora-properties/derivora-properties-starter.git
        </developerConnection>
        <tag>v0.1.0</tag>
        <url>https://gitlab.com/derivora/derivora-properties/derivora-properties-starter</url>
    </scm>

    <issueManagement>
        <system>GitLab</system>
        <url>https://gitlab.com/derivora/derivora-properties/derivora-properties-starter/-/issues</url>
    </issueManagement>

    <properties>
        <derivora.properties.api.version>0.1.0</derivora.properties.api.version>
        <derivora.properties.impl.version>0.1.0</derivora.properties.impl.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>xyz.derivora</groupId>
            <artifactId>derivora-properties-api</artifactId>
            <version>${derivora.properties.api.version}</version>
        </dependency>
        <dependency>
            <groupId>xyz.derivora</groupId>
            <artifactId>derivora-properties-impl</artifactId>
            <version>${derivora.properties.impl.version}</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>${project.basedir}</directory>
                <targetPath>META-INF</targetPath>
                <includes>
                    <include>LICENSE</include>
                    <include>NOTICE</include>
                </includes>
            </resource>
        </resources>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>prod</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-jar-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>attach-javadoc-placeholder</id>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>jar</goal>
                                    </goals>
                                    <configuration>
                                        <classifier>javadoc</classifier>
                                        <classesDirectory>${project.basedir}/src/main/javadoc</classesDirectory>
                                        <archive>
                                            <addMavenDescriptor>false</addMavenDescriptor>
                                        </archive>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>
</project>