<?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>com.karuslabs</groupId>
    <artifactId>elementary-project</artifactId>
    <version>2.0.0</version>
    <packaging>pom</packaging>
    
    <name>Elementary Project</name>
    <description>Elementary is a collection of annotation processing libraries and tools</description>
    <url>https://github.com/Pante/elementary</url>
    <inceptionYear>2021</inceptionYear>

    <scm>
        <connection>scm:git:git://github.com/pante/elementary.git</connection>
        <developerConnection>scm:git:ssh://github.com/pante/elementary.git</developerConnection>
        <url>https://github.com/Pante/elementary</url>
    </scm>

    <developers>
        <developer>
            <name>Matthias Ngeo</name>
            <email>matthiasngeo@gmail.com</email>
            <url>https://github.com/Pante</url>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <release>11</release>
        <repository-head>nightly</repository-head>
    </properties>

    <profiles>
        <profile>
            <id>release</id>
        </profile>

        <profile>
            <id>development</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>

            <distributionManagement>
                <repository>
                    <id>karus</id>
                    <url>https://repo.karuslabs.com/repository/elementary-releases</url>
                </repository>

                <snapshotRepository>
                    <id>karus</id>
                    <url>https://repo.karuslabs.com/repository/elementary-snapshots/</url>
                </snapshotRepository>

                <site>
                    <id>karus</id>
                    <url>dav:https://repo.karuslabs.com/repository/elementary/${repository-head}/</url>
                </site>
            </distributionManagement>

            <repositories>
                <repository>
                    <id>elementary-releases</id>
                    <url>https://repo.karuslabs.com/repository/elementary-releases/</url>
                </repository>

                <repository>
                    <id>elementary-snapshots</id>
                    <url>https://repo.karuslabs.com/repository/elementary-snapshots/</url>
                </repository>
            </repositories>
        </profile>
    </profiles>
    

    
    <modules>
        <module>elementary</module>
        <module>satisfactory</module>
        <module>utilitary</module>
        <module>utilitary-itest</module>
    </modules>
    
    <dependencies>
        <dependency>
            <groupId>org.checkerframework</groupId>
            <artifactId>checker-qual</artifactId>
            <version>3.35.0</version>
            <scope>compile</scope>
        </dependency>
        
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>1.9.3</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>
                
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>5.3.1</version>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>5.3.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    
    <build>
        <defaultGoal>install</defaultGoal>
        <plugins>  
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <release>${release}</release>
                </configuration>
            </plugin>
        
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.1.2</version>
            </plugin>
            
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.3.0</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>10.12.0</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <includeTestResources>false</includeTestResources>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.10</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <plugin> 
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.5.0</version>
                <configuration>
                    <docfilessubdirs>true</docfilessubdirs>
                    <additionalOptions>-html5</additionalOptions>
                    <links>
                        <link>https://checkerframework.org/api/</link>
                        <link>https://junit.org/junit5/docs/current/api/</link>
                        <link>https://repo.karuslabs.com/repository/elementary/${repository-head}/elementary/apidocs</link>
                        <link>https://repo.karuslabs.com/repository/elementary/${repository-head}/satisfactory/apidocs</link>
                        <link>https://repo.karuslabs.com/repository/elementary/${repository-head}/utilitary/apidocs</link>
                    </links>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <plugin> 
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId> 
                <version>3.1.1</version>
                <executions> 
                    <execution>
                        <goals>
                            <goal>deploy</goal>
                        </goals> 
                    </execution> 
                </executions> 
            </plugin>

            <plugin>
                <groupId>org.jreleaser</groupId>
                <artifactId>jreleaser-maven-plugin</artifactId>
                <version>1.6.0</version>
                <configuration>
                    <jreleaser>
                        <signing>
                            <active>ALWAYS</active>
                            <armored>true</armored>
                        </signing>
                        <deploy>
                            <maven>
                                <nexus2>
                                    <maven-central>
                                        <active>ALWAYS</active>
                                        <url>https://s01.oss.sonatype.org/service/local</url>;
                                        <closeRepository>false</closeRepository>
                                        <releaseRepository>false</releaseRepository>
                                        <stagingRepositories>target/staging-deploy</stagingRepositories>
                                    </maven-central>
                                </nexus2>
                            </maven>
                        </deploy>
                    </jreleaser>
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.12.1</version>
                <configuration>
                    <generateProjectInfo>false</generateProjectInfo>
                    <generateReports>false</generateReports>
                    <stagingSiteURL>dav:https://repo.karuslabs.com/repository/elementary/${project.version}/</stagingSiteURL>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-webdav-jackrabbit</artifactId>
                        <version>3.5.3</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
    
</project>