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

    <groupId>org.kendar.simpledi</groupId>
    <artifactId>simple-di</artifactId>
    <version>1.0.1</version>

    <name>Simple Di Handler</name>
    <description>Simple Dependency Injection Framework</description>
    <url>https://www.github.com/kendarorg/simple-di</url>
    <developers>
        <developer>
            <id>kendar</id>
            <name>Enrico Da Ros</name>
            <email>github@kendar.org</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/kendarorg/simple-di.git</connection>
        <developerConnection>scm:git:git://github.com/kendarorg/simple-di.git</developerConnection>
        <url>https://www.github.com/kendarorg/simple-di</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>central</id>
            <name>central</name>
            <url>https://central.sonatype.com</url>
        </repository>
    </distributionManagement>
    <licenses>
        <license>
            <name>The MIT License</name>
            <url>https://raw.githubusercontent.com/kendarorg/simple-di/refs/heads/main/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <assembly.plugin.version>3.7.1</assembly.plugin.version>
        <maven.jar.version>3.2.0</maven.jar.version>
        <reflection.version>0.10.2</reflection.version>
        <junit.jupiter.version>RELEASE</junit.jupiter.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <version>${reflection.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.javassist</groupId>
                    <artifactId>javassist</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.32</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.28.0-GA</version>
            <scope>compile
            </scope> <!-- case: when not actually scanning with javassist or when using Reflections.collect -->
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>distribute</id>
            <build>
                <plugins>
                    <plugin>
                        <!-- The extension to publish on maven central -->
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.7.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                        </configuration>
                    </plugin>
                    <plugin>
                        <!-- Build sources -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <!-- Build Javadoc -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.11.2</version>
                        <configuration>
                            <doclint>-missing</doclint>
                        </configuration>
                        <executions>
                            <execution>
                                <id>createJavadocs</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <!-- Sign the artifacts -->
                        <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>
        </profile>
    </profiles>
</project>