<?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.log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>2.0-beta9</version>
    <relativePath>../</relativePath>
  </parent>
  <artifactId>log4j-core</artifactId>
  <packaging>jar</packaging>
  <name>Apache Log4j Core</name>
  <description>The Log4j Implementation</description>
  <properties>
    <log4jParentDir>${basedir}/..</log4jParentDir>
    <docLabel>Core Documentation</docLabel>
    <projectDir>/core</projectDir>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.lmax</groupId>
      <artifactId>disruptor</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.fusesource.jansi</groupId>
      <artifactId>jansi</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.jmdns</groupId>
      <artifactId>jmdns</artifactId>
      <version>3.4.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-ext</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.persistence</groupId>
      <artifactId>org.eclipse.persistence.jpa</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockejb</groupId>
      <artifactId>mockejb</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jms_1.1_spec</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.sun.mail</groupId>
      <artifactId>javax.mail</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.0.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.persistence</groupId>
      <artifactId>javax.persistence</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.mongodb</groupId>
      <artifactId>mongo-java-driver</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.lightcouch</groupId>
      <artifactId>lightcouch</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>3.2.4.RELEASE</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.osgi</groupId>
      <artifactId>org.eclipse.osgi</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.framework</artifactId>
      <scope>test</scope>
    </dependency>    
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2.1</version>
        <executions>
          <execution>
            <phase>process-classes</phase>
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <mainClass>org.apache.logging.log4j.core.config.plugins.PluginManager</mainClass>
          <arguments>
            <argument>${project.build.outputDirectory}</argument>
          </arguments>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <!--
            dummy entry to stop bundle plugin from picking up jar config and reporting
            WARNING: Duplicate name in Manifest
            See http://markmail.org/message/mpkl24wk3jrjhhjg
          -->
          <archive>
            <forced>true</forced>
          </archive>
          <excludeDependencies>true</excludeDependencies>
          <manifestLocation>target/osgi</manifestLocation>
          <instructions>
            <!-- stops the "uses" clauses being added to "Export-Package" manifest entry -->
            <_nouses>true</_nouses>
            <!-- Stop the JAVA_1_n_HOME variables from being treated as headers by Bnd -->
            <_removeheaders>JAVA_1_3_HOME,JAVA_1_4_HOME,JAVA_1_5_HOME,JAVA_1_6_HOME,JAVA_1_7_HOME,JAVA_1_8_HOME,JAVA_1_9_HOME</_removeheaders>
            <Bundle-SymbolicName>${osgi.symbolicName}</Bundle-SymbolicName>
            <Export-Package>${osgi.export}</Export-Package>
            <Private-Package>${osgi.private}</Private-Package>
            <Import-Package>${osgi.import}</Import-Package>
            <DynamicImport-Package>${osgi.dynamicImport}</DynamicImport-Package>
            <Bundle-DocURL>${project.url}</Bundle-DocURL>
            <Fragment-Host>org.apache.logging.log4j-api;bundle-version=${project.version.osgi}</Fragment-Host>
          </instructions>
        </configuration>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>cleanVersions</goal>
            </goals>
            <configuration>
              <versions>
                <project.version.osgi>${project.version}</project.version.osgi>
              </versions>
            </configuration>
          </execution>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>${changes.plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
        <configuration>
          <issueLinkTemplate>%URL%/show_bug.cgi?id=%ISSUE%</issueLinkTemplate>
          <useJql>true</useJql>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <!--<propertiesLocation>${vfs.parent.dir}/checkstyle.properties</propertiesLocation> -->
          <configLocation>${log4jParentDir}/checkstyle.xml</configLocation>
          <suppressionsLocation>${log4jParentDir}/checkstyle-suppressions.xml</suppressionsLocation>
          <enableRulesSummary>false</enableRulesSummary>
          <propertyExpansion>basedir=${basedir}</propertyExpansion>
          <propertyExpansion>licensedir=${log4jParentDir}/checkstyle-header.txt</propertyExpansion>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${javadoc.plugin.version}</version>
        <configuration>
          <bottom> <![CDATA[<p align="center">Copyright &#169; {inceptionYear}-{currentYear} {organizationName}. All Rights Reserved.<br />
            Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo,
            and the Apache Log4j logo are trademarks of The Apache Software Foundation.</p>]]></bottom>
          <!-- module link generation is completely broken in the javadoc plugin for a multi-module non-aggregating
         project -->
          <detectOfflineLinks>false</detectOfflineLinks>
          <linksource>true</linksource>
          <links>
            <link>http://docs.oracle.com/javaee/6/api/</link>
          </links>
          <tags>
            <tag>
              <name>issue</name>
              <placement>a</placement>
              <head>JIRA issue:</head>
            </tag>
            <tag>
              <name>doubt</name>
              <placement>a</placement>
              <head>Troublesome:</head>
            </tag>
            <tag>
              <name>compare</name>
              <placement>a</placement>
              <head>Compare with:</head>
            </tag>
          </tags>
        </configuration>
        <reportSets>
          <reportSet>
            <id>non-aggregate</id>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>2.5.2</version>
        <configuration>
          <fork>true</fork>
          <jvmArgs>-Duser.language=en</jvmArgs>
          <threshold>Normal</threshold>
          <effort>Default</effort>
          <excludeFilterFile>${log4jParentDir}/findbugs-exclude-filter.xml</excludeFilterFile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.3</version>
        <reportSets>
          <reportSet>
            <id>non-aggregate</id>
            <reports>
              <report>jxr</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>aggregate</id>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${pmd.plugin.version}</version>
        <configuration>
          <targetJdk>${maven.compile.target}</targetJdk>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>${cobertura.plugin.version}</version>
        <reportSets>
          <reportSet>
            <!-- Disabled as it makes the site build very slow and causes the performance unit test to fail -->
            <reports />
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
  <profiles>
    <profile>
      <!-- http://www.yourkit.com/docs/80/help/agent.jsp -->
      <id>yourkit</id>

      <properties>
        <yourkit.home>/Applications/YourKit_Java_Profiler_8.0.17.app</yourkit.home>
      </properties>
      <dependencies>
        <dependency>
          <groupId>com.yourkit</groupId>
          <artifactId>yjp-controller-api-redist</artifactId>
          <version>8.0.17</version>
          <scope>system</scope>
          <systemPath>${yourkit.home}/lib/yjp-controller-api-redist.jar</systemPath>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <argLine>-agentpath:"${yourkit.home}/bin/mac/libyjpagent.jnilib"</argLine>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>

