<?xml version="1.0" encoding="UTF-8"?>
<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>

  <groupId>ch.qos.mistletoe</groupId>
  <artifactId>mistletoe-parent</artifactId>
  <version>0.3</version>

  <packaging>pom</packaging>
  <name>Misteletoe</name>

  <description>Mistletoe: a junit extension intended for integration testing</description>
  <url>http://mistletoe.qos.ch</url>

  <organization>
    <name>QOS.ch</name>
    <url>http://www.qos.ch</url>
  </organization>

  <inceptionYear>2009</inceptionYear>

  <properties>
    <junit.version>4.10</junit.version>
    <servlet-api.version>2.5</servlet-api.version>
    <wicket.version>6.5.0</wicket.version>
    <logback.version>1.0.11</logback.version>
    <maven-jar-plugin.version>2.3.2</maven-jar-plugin.version>
    <maven-compiler-plugin.version>2.5.1</maven-compiler-plugin.version>
    <maven-surefire-plugin.version>2.12</maven-surefire-plugin.version>
    <maven-site-plugin.version>3.0</maven-site-plugin.version>
    <maven-jetty-plugin.version>6.1.26</maven-jetty-plugin.version>
  </properties>

  <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>

  <modules>
    <module>mistletoe-core</module>
    <module>mistletoe-servlet</module>
    <module>mistletoe-wicket</module>
    <module>mistletoe-test</module>
    <module>mistletoe-site</module>
  </modules>


  <scm>
    <url>https://github.com/qos-ch/mistletoe</url>
    <connection>git@github.com:qos-ch/mistletoe.git</connection>
  </scm>

  <developers>
    <developer>
      <id>ceki</id>
      <name>Ceki Gulcu</name>
      <email>ceki@qos.ch</email>
    </developer>
  </developers>


  <dependencyManagement>

    <dependencies>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
      </dependency>

      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback.version}</version>
      </dependency>

      <dependency>
        <groupId>ch.qos.mistletoe</groupId>
        <artifactId>mistletoe-core</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>ch.qos.mistletoe</groupId>
        <artifactId>mistletoe-servlet</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>ch.qos.mistletoe</groupId>
        <artifactId>mistletoe-wicket</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>${servlet-api.version}</version>
      </dependency>

    </dependencies>

  </dependencyManagement>


  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh</artifactId>
        <version>2.0</version>
      </extension>
    </extensions>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
          <forkMode>once</forkMode>
          <reportFormat>plain</reportFormat>
          <trimStackTrace>false</trimStackTrace>
          <excludes>
            <exclude>**/AllTest.java</exclude>
            <exclude>**/PackageTest.java</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- ====== site plugin ===== -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven-site-plugin.version}</version>
        <configuration>
          <reportPlugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <version>2.8</version>
              <configuration>
                <aggregate>true</aggregate>
                <links>
                  <link>
                    http://java.sun.com/j2se/1.5.0/docs/api
                  </link>
                </links>
                <groups>
                  <group>
                    <title>Mistletoe core</title>
                    <packages>ch.qos.mistletoe.core:ch.qos.mistletoe.core.helper</packages>
                  </group>
                  <group>
                    <title>Mistletoe servlet</title>
                    <packages>ch.qos.mistletoe.servlet</packages>
                  </group>
                  <group>
                    <title>Mistletoe wicket</title>
                    <packages>ch.qos.mistletoe.wicket</packages>
                  </group>
                </groups>
              </configuration>
            </plugin>

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jxr-plugin</artifactId>
              <version>2.3</version>
              <configuration>
                <aggregate>true</aggregate>
                <javadocDir>target/site/apidocs/</javadocDir>
                <linkJavadoc>true</linkJavadoc>
              </configuration>
            </plugin>

          </reportPlugins>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <distributionManagement>
    <site>
      <id>pixie</id>
      <url>scp://pixie.qos.ch/var/www/mistletoe.qos.ch/htdocs/</url>
    </site>

    <repository>
      <id>sonatype-nexus-staging</id>
     <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>

  </distributionManagement>


  <profiles>
    <profile>
      <id>testSkip</id>
      <properties>
        <maven.test.skip>true</maven.test.skip>
      </properties>
    </profile>
 
    <profile>
      <id>javadocjar</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    
    
    <profile>
      <id>sign-artifacts</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>    
  </profiles>

</project>
