<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
 * Sonar PDF Plugin, open source plugin for Sonar
 * Copyright (C) 2010 klicap - ingenieria del puzle
 * Copyright (C) 2009 GMV-SGI
 *
 * Sonar PDF Plugin is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * Sonar is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with Sonar; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
 */
-->
<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.codehaus.sonar-plugins.pdf-report</groupId>
    <artifactId>parent</artifactId>
    <version>1.4-SNAPSHOT</version>
  </parent>

  <artifactId>maven-pdfreport-plugin</artifactId>
  <packaging>maven-plugin</packaging>

  <name>Sonar PDF Report (Maven plugin)</name>
  <description>Maven plugin for PDF reporting</description>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>com.lowagie</groupId>
      <artifactId>itext</artifactId>
      <version>2.1.4</version>
    </dependency>
    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <version>1.6.1</version>
    </dependency>
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>1.1.1</version>
      <exclusions>
        <exclusion>
          <groupId>com.ibm.icu</groupId>
          <artifactId>icu4j</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <version>3.1</version>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>5.7</version>
      <scope>test</scope>
      <classifier>jdk15</classifier>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.5.6</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.15</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>javax.mail</groupId>
          <artifactId>mail</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.jms</groupId>
          <artifactId>jms</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.sun.jdmk</groupId>
          <artifactId>jmxtools</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.sun.jmx</groupId>
          <artifactId>jmxri</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Developed-by>klicap - ingenieria del puzle</Developed-by>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <suiteXmlFiles>
            <suiteXmlFile>src/test/config/testng.xml</suiteXmlFile>
          </suiteXmlFiles>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>integration-tests</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>unpack</id>
                <phase>package</phase>
                <goals>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.codehaus.sonar.plugins.it</groupId>
                      <artifactId>struts</artifactId>
                      <version>1.3.9</version>
                      <type>zip</type>
                    </artifactItem>
                  </artifactItems>
                  <outputDirectory>${project.build.directory}/it/maven-projects</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.sonar</groupId>
            <artifactId>sonar-dev-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>start-server</id>
                <phase>pre-integration-test</phase>
                <configuration>
                  <background>true</background>
                  <clean>true</clean>
                </configuration>
                <goals>
                  <goal>start-war</goal>
                </goals>
              </execution>
              <execution>
                <id>analyze-projects</id>
                <phase>pre-integration-test</phase>
                <configuration>
                  <projectsDir>${project.build.directory}/it/maven-projects</projectsDir>
                </configuration>
                <goals>
                  <goal>analyze</goal>
                </goals>
              </execution>
              <execution>
                <id>stop-server</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop-war</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <suiteXmlFiles>
                <suiteXmlFile>src/test/config/testng-it.xml</suiteXmlFile>
              </suiteXmlFiles>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <repositories>
        <repository>
          <id>sonarsource-releases</id>
          <name>SonarSource releases</name>
          <url>http://repository.sonarsource.org/content/repositories/sonar/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>

</project>
