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

<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This 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 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software 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 this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<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.xwiki.commons</groupId>
    <artifactId>xwiki-commons-pom</artifactId>
    <version>7.4.2</version>
  </parent>
  <groupId>org.xwiki.contrib</groupId>
  <artifactId>application-ircbot</artifactId>
  <name>IRC Bot - Parent POM</name>
  <version>8.1</version>
  <packaging>pom</packaging>
  <description>IRC Bot Application for XWiki</description>
  <scm>
    <connection>scm:git:git://github.com/xwiki-contrib/application-ircbot.git</connection>
    <developerConnection>scm:git:git@github.com:xwiki-contrib/application-ircbot.git</developerConnection>
    <url>https://github.com/xwiki-contrib/application-ircbot</url>
    <tag>application-ircbot-8.1</tag>
  </scm>
  <developers>
    <developer>
      <id>vmassol</id>
      <name>Vincent Massol</name>
    </developer>
    <developer>
      <id>xwikidev</id>
      <name>XWiki Development Team</name>
    </developer>
  </developers>
  <properties>
    <rendering.version>${commons.version}</rendering.version>
    <platform.version>${commons.version}</platform.version>
  </properties>
  <dependencies>
    <!-- Adds an Annotation Processor to automatically verify Component declarations.
         Note that we need to add this dependency because the Maven Compiler Plugin doesn't support
         having a plugin dependency. Thus we need it as a normal dependency and in order to avoid drawing it
         transitively we defined it as a "provided" dependency -->
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-tool-verification-resources</artifactId>
      <version>${commons.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <configuration>
            <archive>
              <!-- Use the manifest file generated by the OSGi Maven Bundle Plugin -->
              <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <systemProperties combine.children="append">
              <!-- Generate screenshots in the target dir when a test is failing -->
              <property>
                <name>screenshotDirectory</name>
                <value>${basedir}/target/screenshots</value>
              </property>
              <!-- This property makes it simple for some module to exclude the check (for example for functional
                   tests) -->
              <property>
                <name>xwiki.surefire.captureconsole.skip</name>
                <value>${xwiki.surefire.captureconsole.skip}</value>
              </property>
            </systemProperties>
            <!-- Verify that unit tests don't output anything to stdout/stderr -->
            <properties>
              <property>
                <name>listener</name>
                <value>org.xwiki.test.CaptureConsoleRunListener</value>
              </property>
            </properties>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.xwiki.commons</groupId>
              <artifactId>xwiki-commons-tool-test-simple</artifactId>
              <version>${commons.version}</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <!-- Generate OSGi Manifest information -->
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
        <configuration>
          <!-- List of specific CLIRR excludes. Example:

            <difference>
              <differenceType>7012</differenceType>
              <className>org/xwiki/ircbot/IRCBot</className>
              <method>void initialize(java.lang.String)</method>
              <justification>IRCBot is still a young API. Added a new initialize() method to support installing the
                IRC Bot application in a subwiki</justification>
            </difference>

             See http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html
          -->
          <ignored>
            <!-- Remove the following ignores after we release the current version as final -->
          </ignored>
          <excludes>
            <exclude>**/internal/**</exclude>
            <exclude>**/test/**</exclude>
            <!-- Remove the following excludes after we release the current version as final -->
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <modules>
    <module>application-ircbot-api</module>
    <module>application-ircbot-ui</module>
  </modules>
  <profiles>
    <profile>
      <id>integration-tests</id>
      <modules>
        <module>application-ircbot-test</module>
      </modules>
    </profile>
  </profiles>
  <distributionManagement>
    <repository>
      <id>xwiki-staging</id>
      <name>XWiki Staging Repository</name>
      <url>http://nexus.xwiki.org/nexus/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
</project>
