<!--
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you 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
 *
 * http://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.
-->
<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.google.api-ads</groupId>
  <artifactId>client-libs-parent</artifactId>
  <version>5.9.0</version>

  <packaging>pom</packaging>
  <name>Google Ads APIs Client Library for Java parent</name>
  <description>
    Parent POM of the Google Ads APIs Client Library for Java.
  </description>

  <url>https://github.com/googleads/googleads-java-lib/</url>
  <issueManagement>
    <system>github.com</system>
    <url>
      https://github.com/googleads/googleads-java-lib/issues
    </url>
  </issueManagement>

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

  <scm>
    <connection>
      scm:git:https://github.com/googleads/googleads-java-lib
    </connection>
    <developerConnection>
      scm:git:https://github.com/googleads/googleads-java-lib
    </developerConnection>
    <url>
      https://github.com/googleads/googleads-java-lib
    </url>
    <tag>5.9.0</tag>
  </scm>

  <developers>
    <developer>
      <id>jradcliff</id>
      <name>Josh Radcliff</name>
      <email>jradcliff@users.noreply.github.com</email>
      <organization>Google</organization>
      <organizationUrl>http://www.google.com</organizationUrl>
      <roles>
        <role>owner</role>
        <role>developer</role>
      </roles>
      <timezone>-5</timezone>
    </developer>
    <developer>
      <id>cseeley</id>
      <name>Chris Seeley</name>
      <email>christopherseeley@users.noreply.github.com</email>
      <organization>Google</organization>
      <organizationUrl>http://www.google.com</organizationUrl>
      <roles>
        <role>owner</role>
        <role>developer</role>
      </roles>
      <timezone>-5</timezone>
    </developer>
  </developers>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M2</version>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>[3.0,)</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[1.8,)</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <showWarnings>false</showWarnings>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.0.1</version>
        <configuration>
          <maxmemory>1024m</maxmemory>
          <reportOutputDirectory>.</reportOutputDirectory>
          <destDir>javadocs</destDir>
          <!-- Disable doclint. See http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html -->
          <doclint>none</doclint>
          <excludePackageNames>
            <!-- Always exclude *.conf packages. -->
            *.conf
          </excludePackageNames>
          <!-- Only show warnings and errors. -->
          <quiet>true</quiet>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>
      <plugin>
        <!--
          Specify the release-plugin version explicitly to avoid
          https://issues.apache.org/jira/browse/MRELEASE-812 in
          versions 2.3.2 and 2.4.0, which caused release:perform to
          skip github commits before each push.
        -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
      </plugin>
      <plugin>
        <!--
          Specify the deploy-plugin version explicitly to avoid
          warnings of the form:

            'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin
            is missing.

          during execution of the release:perform goal, which internally
          executes the deploy goal.
        -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
        <!-- Skip maven-deploy plugin. Sonatype central plugin does the deploy. -->
        <executions>
          <execution>
              <id>default-deploy</id>
              <phase>deploy</phase>
              <goals>
                  <goal>deploy</goal>
              </goals>
              <configuration>
                  <skip>true</skip>
              </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>de.thetaphi</groupId>
        <artifactId>forbiddenapis</artifactId>
        <version>2.3</version>
        <configuration>
          <!--
            If the used Java version is too new, don't fail, just do nothing.
          -->
          <failOnUnsupportedJava>false</failOnUnsupportedJava>
          <bundledSignatures>
            <bundledSignature>jdk-deprecated</bundledSignature>
            <bundledSignature>jdk-non-portable</bundledSignature>
          </bundledSignatures>
        </configuration>
        <executions>
          <execution>
            <!--
              These goals run in the 'verify' phase by default. Move them to
              'install' so issues will be caught during development.
            -->
            <phase>install</phase>
            <goals>
              <goal>check</goal>
              <goal>testCheck</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <modules>
    <module>modules/ads_lib</module>
    <module>modules/ads_lib_appengine</module>
    <module>modules/ads_lib_axis</module>
    <module>modules/dfp_appengine</module>
    <module>modules/dfp_axis</module>
  </modules>

  <profiles>
    <profile>
      <id>sonatype</id>
      <distributionManagement>
        <repository>
          <id>sonatype-nexus-staging</id>
          <url>https://central.sonatype.com</url>
        </repository>
        <snapshotRepository>
          <id>sonatype-nexus-snapshots</id>
          <url>https://central.sonatype.com/repository/maven-snapshots/</url>
        </snapshotRepository>
      </distributionManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.7.0</version>
            <extensions>true</extensions>
            <executions>
              <execution>
                <id>default-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>publish</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <publishingServerId>sonatype-nexus-staging</publishingServerId>
              <autoPublish>false</autoPublish>
              <deploymentName>com.google.api-ads:client-libs-parent-v5.9.0-bundle</deploymentName>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <!--
            Only sign artifacts when performing the release,
            not when building SNAPSHOT versions.
          -->
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>friendly-javadoc</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8</version>
            <configuration>
              <reportOutputDirectory>.</reportOutputDirectory>
              <destDir>javadocs</destDir>
              <!-- Disable doclint. See http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html -->
              <additionalparam>-Xdoclint:none</additionalparam>
              <excludePackageNames>
                <!-- Ignore autogenerated classes and conf packages. -->
                *.conf:*.axis.v*:*.jaxws.v*:com.google.api.ads.tools.*
              </excludePackageNames>
              <!-- Only show warnings or errors. -->
              <quiet>true</quiet>
              <groups>
                <group>
                  <title>Core Library</title>
                  <packages>
                    com.google.api.ads.common.*
                  </packages>
                </group>
                <group>
                  <title>Ad Manager Library Classes</title>
                  <packages>
                    com.google.api.ads.admanager.*
                  </packages>
                </group>
              </groups>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
