<?xml version="1.0"?>
<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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>ch.epfl.scala</groupId>
  <artifactId>bloop-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>

  <version>2.0.0-RC3</version>
  <name>Bloop Maven Plugin</name>
  <description>A Maven plugin which exports your Maven build into a format Bloop can understand.</description>
  <url>https://scalacenter.github.io/bloop/docs/build-tools/maven</url>
  <inceptionYear>2017</inceptionYear>

  <properties>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
    <nexus.url>https://oss.sonatype.org</nexus.url>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <version.maven.base>3.8.6</version.maven.base>
    <version.maven.plugin.plugin>3.7.0</version.maven.plugin.plugin>
  </properties>

  <scm>
    <connection>scm:git:https://github.com/scalacenter/bloop-maven-plugin.git</connection>
    <developerConnection>scm:git:https://github.com/scalacenter/bloop-maven-plugin.git</developerConnection>
    <url>https://github.com/scalacenter/bloop-maven-plugin</url>
    <tag>bloop-maven-plugin-2.0.0-RC3</tag>
  </scm>

  <ciManagement>
    <system>GitHub Actions</system>
    <url>https://github.com/scalacenter/maven-bloop/actions</url>
  </ciManagement>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/scalacenter/maven-bloop/issues</url>
  </issueManagement>

  <distributionManagement>
    <snapshotRepository>
      <id>central</id>
      <url>${nexus.url}/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>central</id>
      <url>${nexus.url}/service/local/staging/deploy/maven2</url>
    </repository>
  </distributionManagement>

  <developers>
    <developer>
      <id>jvican</id>
      <name>Jorge Vicente Cantero</name>
      <email>jorge@vican.me</email>
    </developer>
    <developer>
      <id>Duhemm</id>
      <name>Martin Duhem</name>
      <email>martin.duhem@gmail.com</email>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>Apache-2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${version.maven.plugin.plugin}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <version>4.5.3</version>
        <executions>
          <execution>
            <id>mixed-compile</id>
            <phase>process-resources</phase>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.13</version>
            <extensions>true</extensions>
            <configuration>
              <nexusUrl>${nexus.url}</nexusUrl>
              <serverId>central</serverId>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencies>
    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
      <version>2.13.8</version>
    </dependency>
    <dependency>
      <groupId>ch.epfl.scala</groupId>
      <artifactId>bloop-config_2.13</artifactId>
      <version>1.5.5</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${version.maven.base}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${version.maven.base}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${version.maven.base}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${version.maven.base}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>${version.maven.plugin.plugin}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>net.alchim31.maven</groupId>
      <artifactId>scala-maven-plugin</artifactId>
      <version>4.8.0</version>
      <type>maven-plugin</type>
    </dependency>

    <!-- Test -->
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-verifier</artifactId>
      <version>1.7.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.sbt</groupId>
      <artifactId>junit-interface</artifactId>
      <version>0.13.3</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>
