<?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>se.kth.castor</groupId>
    <artifactId>sorald-parent</artifactId>
    <version>0.8.2</version>
    <packaging>pom</packaging>

    <name>Sorald-parent</name>
    <description>An automatic repair system for static code analysis warnings from Sonar Java.</description>
    <url>https://github.com/SpoonLabs/sorald</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>khaes-kth</id>
            <name>Khashayar Etemadi</name>
            <email>khaes@kth.se</email>
            <organization>KTH Royal Institute of Technology</organization>
            <organizationUrl>https://www.kth.se</organizationUrl>
        </developer>
        <developer>
            <id>algomaster99</id>
            <name>Aman Sharma</name>
            <email>amansha@kth.se</email>
            <url>https://algomaster99.github.io/</url>
            <organization>KTH Royal Institute of Technology</organization>
            <organizationUrl>https://www.kth.se</organizationUrl>
        </developer>
        <developer>
            <id>fermadeiral</id>
            <name>Fernanda Madeiral</name>
            <email>fer.madeiral@gmail.com</email>
            <organization>KTH Royal Institute of Technology</organization>
            <organizationUrl>https://www.kth.se</organizationUrl>
        </developer>
    </developers>

    <dependencies>
        <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.9.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>1.9.2</version>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>2.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.4.6</version>
            <scope>
                <!--Enabled for tests to make it possible to silence INFO log output from SonarJava-->
                test
            </scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/fr.inria.gforge.spoon/spoon-core -->
        <dependency>
            <groupId>fr.inria.gforge.spoon</groupId>
            <artifactId>spoon-core</artifactId>
            <version>10.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>3.0.2</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jgit</groupId>
            <artifactId>org.eclipse.jgit</artifactId>
            <version>6.5.0.202303070854-r</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.11.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.auto.service</groupId>
            <artifactId>auto-service</artifactId>
            <version>1.0.1</version>
            <optional>true</optional>
        </dependency>
    </dependencies>
    <properties>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <picocli.version>4.6.3</picocli.version>
        <sonar.projectKey>SpoonLabs_sorald</sonar.projectKey>
        <sonar.moduleKey>${project.artifactId}</sonar.moduleKey>
        <sonar.organization>spoonlabs</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    </properties>
    <build>
    <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.1.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.0</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>2.0.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-api</artifactId>
                        <version>2.0.0</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>default</id>
                        <goals>
                            <goal>perform</goal>
                        </goals>
                        <configuration>
                            <pomFileName>pom.xml</pomFileName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.5.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-surefire-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
            </plugin>
            <!-- adapted from https://www.jacoco.org/jacoco/trunk/doc/examples/build/pom.xml -->
            <!-- adapted from https://github.com/diffplug/spotless/blob/main/plugin-maven/README.md -->
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>2.35.0</version>
                <configuration>
                    <java>
                        <includes>
                            <include>src/main/java/**/*.java</include>
                            <include>src/test/java/**/*.java</include>
                        </includes>
                        <googleJavaFormat>
                            <version>1.15.0</version>
                            <style>AOSP</style>
                        </googleJavaFormat>
                    </java>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>spoonSnapshot</id>
            <repositories>
                <repository>
                    <id>ow2.org-snapshot</id>
                    <name>Maven Repository for Spoon Snapshots</name>
                    <url>https://repository.ow2.org/nexus/content/repositories/snapshots/</url>
                    <snapshots><enabled>true</enabled></snapshots>
                </repository>
            </repositories>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <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</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <scm>
        <connection>scm:git:https://github.com/SpoonLabs/sorald.git</connection>
        <developerConnection>scm:git:ssh://github.com/SpoonLabs/sorald.git</developerConnection>
        <url>https://github.com/SpoonLabs/sorald</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <modules>
        <module>sorald-api</module>
        <module>sorald</module>
    </modules>
</project>