<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ 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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.logging</groupId>
    <artifactId>logging-parent</artifactId>
    <version>1</version>
  </parent>

  <groupId>org.apache.logging.log4j</groupId>
  <artifactId>log4j-scala</artifactId>
  <version>11.0</version>
  <packaging>pom</packaging>

  <name>Apache Log4j 2 Scala API</name>
  <description>Apache Log4j 2 Scala API</description>
  <url>http://logging.apache.org/log4j/2.x/</url>

  <scm>
    <connection>scm:git:http://git-wip-us.apache.org/repos/asf/logging-log4j-scala.git</connection>
    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/logging-log4j-scala.git</developerConnection>
    <url>https://git-wip-us.apache.org/repos/asf?p=logging-log4j-scala.git;a=summary</url>
    <tag>11.0-rc2</tag>
  </scm>

  <properties>
    <maven-site-plugin.version>3.6</maven-site-plugin.version>
    <log4jParentDir>${basedir}</log4jParentDir>
    <Log4jScalaApiReleaseVersion>11.0</Log4jScalaApiReleaseVersion>
    <log4j.version>2.8.2</log4j.version>
    <changes.plugin.version>2.12.1</changes.plugin.version>
    <pmd.plugin.version>3.7</pmd.plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api-scala_2.10</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api-scala_2.11</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api-scala_2.12</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>${log4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>${log4j.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>${log4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>${log4j.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <modules>
    <module>log4j-api-scala_2.10</module>
    <module>log4j-api-scala_2.11</module>
    <module>log4j-api-scala_2.12</module>
    <module>log4j-api-scala-sample</module>
  </modules>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven-site-plugin.version}</version>
          <configuration>
            <locales>en</locales>
            <templateFile>${log4jParentDir}/src/site/site.vm</templateFile>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>3.2.0</version>
          <inherited>true</inherited>
          <extensions>true</extensions>
          <executions>
            <execution>
              <goals>
                <goal>manifest</goal>
              </goals>
              <phase>process-classes</phase>
            </execution>
          </executions>
        </plugin>
        <!-- RAT report -->
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <configuration>
            <excludes>
              <!-- README does not need a license header -->
              <exclude>README.md</exclude>
              <!-- jQuery is MIT-licensed, but RAT can't figure it out -->
              <exclude>src/site/resources/js/jquery.js</exclude>
              <exclude>src/site/resources/js/jquery.min.js</exclude>
              <!-- Generated files -->
              <exclude>log4j-distribution/target/**/*</exclude>
              <exclude>log4j-distribution/.project</exclude>
              <exclude>log4j-distribution/.settings/**</exclude>
              <exclude>velocity.log</exclude>
              <!-- Other -->
              <exclude>felix-cache/**</exclude>
              <exclude>RELEASE-NOTES.md</exclude>
            </excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <distributionManagement>
    <downloadUrl>https://logging.apache.org/log4j/2.x/download.html</downloadUrl>
    <!-- site is only included to make maven-site-plugin stop complaining -->
    <site>
      <id>www.example.com</id>
      <url>scp://www.example.com/www/docs/project/</url>
    </site>
  </distributionManagement>

  <profiles>
    <profile>
      <id>apache-release</id>
      <modules>
        <module>log4j-scala-distribution</module>
      </modules>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>source-release-assembly</id>
                <configuration>
                  <skipAssembly>true</skipAssembly>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
