<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.fluo</groupId>
    <artifactId>fluo-project</artifactId>
    <version>2.0.0</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <artifactId>fluo-api</artifactId>
  <name>Apache Fluo API</name>
  <description>This module contains all API code for Apache Fluo. External dependencies should be
    limited. Any changes to public methods should be avoided. While the API module does not have
    compile time dependency on fluo-core, you must include fluo-core as a run-time dependency.</description>
  <!-- Avoid (if possible) adding new dependencies to the API jar -->
  <dependencies>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-configuration2</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j2-impl</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <!-- This configuration is merged with the checkstyle config in the parent pom.  The
	     reason its here is because these logging checks are only needed for a subset of
             child modules.  Could not figure out a way to put the config in the parent pom
             and only have some children use it.  So this config is duplicated in the api and
             core poms.  If making changes, make them in both places. -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <executions>
          <execution>
            <id>logging-impl-check</id>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <checkstyleRules>
                <module name="Checker">
                  <module name="TreeWalker">
                    <module name="IllegalImport">
                      <!-- make sure no code imports logging implementations.  Should only use slf4j -->
                      <property name="illegalPkgs" value="org.apache.log4j,ch.qos.logback" />
                    </module>
                  </module>
                </module>
              </checkstyleRules>
              <failOnViolation>true</failOnViolation>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>net.revelc.code</groupId>
        <artifactId>apilyzer-maven-plugin</artifactId>
        <version>1.0.1</version>
        <executions>
          <execution>
            <id>apilyzer</id>
            <goals>
              <goal>analyze</goal>
            </goals>
            <configuration>
              <includes>
                <include>org[.]apache[.]fluo[.]api[.].*</include>
              </includes>
              <excludes />
              <allows />
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
