<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2014 The logback-extensions developers (logback-user@qos.ch)

    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

            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.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <groupId>org.logback-extensions</groupId>
  <artifactId>logback-ext-parent</artifactId>
  <packaging>pom</packaging>
  <version>0.1.4</version>

  <name>Logback Extensions</name>
  <url>https://github.com/qos-ch/logback-extensions/</url>
  <description>
    Logback Extensions provides community-driven and supported extensions to
    the Logback logging framework.
  </description>
  <inceptionYear>2014</inceptionYear>

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

  <scm>
    <connection>scm:git:git://github.com/qos-ch/logback-extensions.git</connection>
    <developerConnection>scm:git:git@github.com:qos-ch/logback-extensions.git</developerConnection>
    <url>https://github.com/qos-ch/logback-extensions</url>
    <tag>v_0.1.4</tag>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/qos-ch/logback-extensions/issues</url>
  </issueManagement>

  <developers>
    <developer>
      <id>lhazlewood</id>
      <name>Les Hazlewood</name>
      <email>les@hazlewood.com</email>
      <url>http://www.leshazlewood.com</url>
      <timezone>-8</timezone>
    </developer>
    <developer>
      <id>belaso</id>
      <name>Christian Trutz</name>
      <email>christian.trutz@belaso.de</email>
      <url>http://www.belaso.de</url>
      <timezone>+2</timezone>
    </developer>
    <developer>
      <id>tony19</id>
      <name>Tony Trinh</name>
      <email>tony19@gmail.com</email>
      <url>http://tony19.github.com</url>
      <timezone>-5</timezone>
    </developer>
  </developers>

  <modules>
    <module>loggly</module>
    <module>spring</module>
  </modules>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <logback.version>1.1.1</logback.version>

    <!-- JDK properties that can be overridden from the command line
         to build under a different JDKs (continuous integration) -->
    <jdk.version>1.6</jdk.version>
    <maven.compiler.source>${jdk.version}</maven.compiler.source>
    <maven.compiler.target>${jdk.version}</maven.compiler.target>

    <!-- redirect test output to a file in order to reduce noise -->
    <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
  </properties>

  <dependencies>
    <!-- Test Dependencies for _all_ children modules: -->
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.9.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <dependencyManagement>

    <dependencies>

      <!-- Logback Extensions sub-modules dependency .jars (alphabetized based on artifactId for easy scanning please!): -->
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-access</artifactId>
        <version>${logback.version}</version>
      </dependency>

      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback.version}</version>
      </dependency>

      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-core</artifactId>
        <version>${logback.version}</version>
      </dependency>
    </dependencies>

  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <encoding>UTF-8</encoding>
            <showWarnings>true</showWarnings>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.3.1</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
              <manifestEntries>
                <Implementation-Build>${buildNumber}</Implementation-Build>
                <Implementation-Timestamp>${timestamp}</Implementation-Timestamp>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>

        <!-- to perform release, enter: "mvn release:clean release:prepare release:perf -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5</version>
          <configuration>
            <preparationGoals>clean install</preparationGoals>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <useReleaseProfile>true</useReleaseProfile>
            <releaseProfiles>release</releaseProfiles>
            <mavenExecutorId>forked-path</mavenExecutorId>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <doCheck>false</doCheck>
          <doUpdate>false</doUpdate>
          <timestampFormat>{0,date,d-MMM-yyyy HH:mm:ss Z}</timestampFormat>
          <items>
            <item>timestamp</item>
          </items>
        </configuration>
      </plugin>

      <!-- to generate javadocs, enter: "mvn javadoc:javadoc" -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8.1</version>
        <configuration>
          <aggregate>true</aggregate>
          <groups>
            <group>
              <title>Loggly Extension</title>
              <packages>ch.qos.logback.ext.loggly:ch.qos.logback.ext.loggly.*</packages>
            </group>
            <group>
              <title>Spring Extension</title>
              <packages>ch.qos.logback.ext.spring:ch.qos.logback.ext.spring.*</packages>
            </group>
          </groups>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>resources</goal>
              <goal>testResources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
      </plugin>

      <!-- to format license headers, enter: "mvn license:format" -->
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
          <properties>
            <owner>The logback-extensions developers</owner>
            <year>2014</year>
            <email>logback-user@qos.ch</email>
          </properties>
          <excludes>
            <exclude>**/README*</exclude>
            <exclude>**/LICENSE*</exclude>
            <exclude>**/AUTHORS*</exclude>
            <exclude>src/test/resources/**</exclude>
            <exclude>src/main/resources/**</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <profiles>

    <profile>
      <id>release</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <!--
            To disable debug compilation, debug must be "true" AND
            debuglevel must be "none".
            http://jira.codehaus.org/browse/MCOMPILER-114
        -->
        <maven.compiler.debug>true</maven.compiler.debug>
        <maven.compiler.debuglevel>none</maven.compiler.debuglevel>

        <maven.compiler.optimize>true</maven.compiler.optimize>
      </properties>
    </profile>

    <profile>
      <id>debug</id>
      <properties>
        <maven.compiler.debug>true</maven.compiler.debug>
        <maven.compiler.debuglevel>lines,vars,source</maven.compiler.debuglevel>
      </properties>
    </profile>

    <profile>
      <id>analyze</id>

      <build>
        <plugins>
          <!-- Cobertura (code coverage tool) -->
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.6</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>cobertura</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.3</version>
            <configuration>
              <reportPlugins>
                <!-- Cobertura (code coverage tool) -->
                <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>cobertura-maven-plugin</artifactId>
                  <configuration>
                    <formats>
                      <format>html</format>
                      <format>xml</format>
                    </formats>
                  </configuration>
                </plugin>

                <!-- JXR (source code reference generator) -->
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-jxr-plugin</artifactId>
                  <version>2.3</version>
                </plugin>

                <!-- FindBugs (static code analysis tool) -->
                <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>findbugs-maven-plugin</artifactId>
                  <version>2.5.3</version>
                  <configuration>
                    <threshold>Low</threshold>
                    <effort>Max</effort>
                  </configuration>
                </plugin>

                <!-- PMD (static code analysis tool) -->
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-pmd-plugin</artifactId>
                  <version>3.0.1</version>
                  <configuration>
                    <linkXref>true</linkXref>
                    <sourceEncoding>utf-8</sourceEncoding>
                    <minimumTokens>100</minimumTokens>
                    <targetJdk>${jdk.version}</targetJdk>
                  </configuration>
                </plugin>

                <!-- Checkstyle (code-style analysis tool) -->
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-checkstyle-plugin</artifactId>
                  <version>2.11</version>
                </plugin>

              </reportPlugins>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
