<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>com.github.tony19</groupId>
  <artifactId>logback-android-parent</artifactId>
  <version>1.1.1-1</version>
  <packaging>pom</packaging>
  <name>Logback Android Parent</name>
  <description>logback-android project pom.xml file</description>

  <url>http://logback.qos.ch/android</url>

  <organization>
    <name>QOS.ch</name>
    <url>http://www.qos.ch</url>
  </organization>
  <inceptionYear>2005</inceptionYear>

  <licenses>
    <license>
      <name>Eclipse Public License - v 1.0</name>
      <url>http://www.eclipse.org/legal/epl-v10.html</url>
    </license>

    <license>
      <name>GNU Lesser General Public License</name>
      <url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</url>
    </license>
  </licenses>

  <scm>
    <url>https://github.com/tony19/logback-android</url>
    <connection>scm:git@github.com:tony19/logback-android.git</connection>
    <developerConnection>scm:git:git@github.com:tony19/logback-android.git</developerConnection>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/tony19/logback-android/issues</url>
  </issueManagement>

  <modules>
    <module>logback-core</module>
    <module>logback-classic</module>
  </modules>

  <properties>
    <!-- target JDK version == source JDK version -->
    <jdk.version>1.5</jdk.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

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

  <developers>
    <developer>
      <id>ceki</id>
      <name>Ceki Gulcu</name>
      <email>ceki@qos.ch</email>
    </developer>

    <developer>
      <id>hixi</id>
      <name>Joern Huxhorn</name>
      <email>huxi@undisclosed.org</email>
    </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>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>com.github.tony19</groupId>
        <artifactId>apktool-lib</artifactId>
        <version>1.4.4-3</version>
      </dependency>

      <dependency>
        <groupId>com.github.tony19</groupId>
        <artifactId>logback-android-classic</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.github.tony19</groupId>
        <artifactId>logback-android-core</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.github.tony19</groupId>
        <artifactId>logback-android-core</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <version>2.1.2</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>com.icegreen</groupId>
        <artifactId>greenmail</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>dom4j</groupId>
        <artifactId>dom4j</artifactId>
        <version>1.6.1</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.10</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-library</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.easytesting</groupId>
        <artifactId>fest-assert</artifactId>
        <version>1.2</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>1.9.0</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>log4j-over-slf4j</artifactId>
        <version>1.7.6</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.6</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-ext</artifactId>
        <version>1.7.6</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>integration</artifactId>
        <version>1.7.6</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <type>test-jar</type>
        <version>1.7.6</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.subethamail</groupId>
        <artifactId>subethasmtp</artifactId>
        <version>2.1.0</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.5.1</version>
          <configuration>
            <showDeprecation>true</showDeprecation>
            <showWarnings>true</showWarnings>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.14.1</version>
          <configuration>

            <forkCount>2</forkCount>
            <reuseForks>true</reuseForks>
            <parallel>classes</parallel>

            <reportFormat>plain</reportFormat>
            <trimStackTrace>false</trimStackTrace>

            <excludes>
              <!-- Ignore performance tests. They're run as part of the 'perf' profile. -->
              <exclude>**/*PerfTest.java</exclude>

              <!--  Disable fragile network tests to be refactored later -->
              <exclude>**/net/*.java</exclude>
            </excludes>
        </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>

      <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>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.1</version>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/dist.xml</descriptor>
          </descriptors>
          <finalName>logback-android-${project.version}</finalName>
          <appendAssemblyId>false</appendAssemblyId>
          <outputDirectory>target/site/dist/</outputDirectory>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8.1</version>
        <configuration>
          <aggregate>true</aggregate>
          <links>
            <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
          </links>
          <groups>
            <group>
              <title>Logback Core</title>
              <packages>ch.qos.logback.core:ch.qos.logback.core.*</packages>
            </group>
            <group>
              <title>Logback Classic</title>
              <packages>ch.qos.logback:ch.qos.logback.classic:ch.qos.logback.classic.*</packages>
            </group>
            <group>
              <title>SLF4J</title>
              <packages>org.slf4j:org.slf4j.*</packages>
            </group>
          </groups>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>testSkip</id>
      <properties>
        <maven.test.skip>true</maven.test.skip>
      </properties>
    </profile>

    <profile>
      <id>license</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.mycila.maven-license-plugin</groupId>
            <artifactId>maven-license-plugin</artifactId>
            <version>1.9.0</version>
            <configuration>
              <header>src/main/licenseHeader.txt</header>
              <quiet>false</quiet>
              <failIfMissing>true</failIfMissing>
              <aggregate>true</aggregate>
              <includes>
                <include>src/**/*.java</include>
              </includes>
              <useDefaultExcludes>true</useDefaultExcludes>
              <useDefaultMapping>true</useDefaultMapping>
              <properties>
                <year>2013</year>
              </properties>
              <headerDefinitions>
                <headerDefinition>src/main/javadocHeaders.xml</headerDefinition>
              </headerDefinitions>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <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>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>
      </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>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <excludes>
                <!-- skip performance tests because the analysis tools will throw off
                the timing checks, causing false-positive test failures -->
                <exclude>**/*PerfTest.java</exclude>
                <exclude>**/ReconfigureOnChangeTest.java</exclude>
                <exclude>**/PackageDataCalculatorTest.java</exclude>

                <!--  Disable fragile network tests to be refactored later -->
                <exclude>**/net/*.java</exclude>
              </excludes>
            </configuration>
          </plugin>

          <!-- Cobertura (code coverage tool) -->
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.5.1</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.0</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.2</version>
                  <configuration>
                    <threshold>Low</threshold>
                    <effort>Max</effort>
                    <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
                  </configuration>
                </plugin>

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

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

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

    <profile>
      <id>perf</id>

      <!-- run all performance tests -->
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <includes>
                <include>**/*PerfTest.java</include>
                <include>**/ReconfigureOnChangeTest.java</include>
                <include>**/PackageDataCalculatorTest.java</include>
              </includes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
