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

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <graalvm.version>21.3.0</graalvm.version>
    <native.maven.plugin.version>0.9.7.1</native.maven.plugin.version>
    <grpc.netty.version>1.42.1</grpc.netty.version>
  </properties>

  <name>Google Cloud GraalVM Support Parent</name>
  <description>The parent POM of the project providing Google Cloud GraalVM support.</description>
  <url>https://github.com/GoogleCloudPlatform/native-image-support-java</url>
  <packaging>pom</packaging>

  <groupId>com.google.cloud</groupId>
  <artifactId>native-image-support-parent</artifactId>
  <version>0.10.0</version>

  <scm>
    <url>https://github.com/GoogleCloudPlatform/native-image-support-java</url>
    <connection>scm:git:git://github.com/GoogleCloudPlatform/native-image-support-java.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/GoogleCloudPlatform/native-image-support-java.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.1.2</version>
        <configuration>
          <consoleOutput>false</consoleOutput>
          <failOnViolation>true</failOnViolation>
          <violationSeverity>warning</violationSeverity>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>9.1</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>validate-google-style</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <configLocation>google_checks.xml</configLocation>
              <suppressionsLocation>checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
            </configuration>
          </execution>
          <execution>
            <id>validate-file-header</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <headerLocation>src/checkstyle/java.header</headerLocation>
              <configLocation>src/checkstyle/custom-checks.xml</configLocation>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <module>native-image-support</module>
        <module>native-image-samples</module>
      </modules>
    </profile>

    <profile>
      <id>release</id>
      <modules>
        <module>native-image-support</module>
      </modules>

      <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-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.3.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <doclint>none</doclint>
                  <source>8</source>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <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.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://google.oss.sonatype.org/</nexusUrl>
              <stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://google.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://google.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
      <comments>
        Copyright 2020-2021 the original author or authors.

        Licensed under the Apache License, Version 2.0 (the "License");
        you may not use this file except in compliance with the License.
        You may obtain a copy of the License at

        https://www.apache.org/licenses/LICENSE-2.0

        Unless required by applicable law or agreed to in writing, software
        distributed under the License is distributed on an "AS IS" BASIS,
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
        implied.

        See the License for the specific language governing permissions and
        limitations under the License.
      </comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <organization>Google</organization>
      <organizationUrl>http://cloud.google.com</organizationUrl>
    </developer>
  </developers>
</project>
