<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (c) 2008 Sonatype, Inc.
  All rights reserved. This program and the accompanying materials
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
  http://www.eclipse.org/legal/epl-v10.html
-->
<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.sonatype.forge</groupId>
    <artifactId>forge-parent</artifactId>
    <version>6</version>
  </parent>

  <groupId>org.maven.ide.eclipse.extras</groupId>
  <artifactId>m2eclipse-extras</artifactId>
  <version>0.10.3.20100811-1647</version>
  <packaging>pom</packaging>

  <properties>
    <tycho-version>0.9.0</tycho-version>

    <m2eclipse-core.version>0.11.0/S/0.11.0.20100811-1422</m2eclipse-core.version>

    <site-compressed>http://repository.sonatype.org/service/local/repositories/forge-sites/content-compressed/</site-compressed>
  </properties>

  <modules>
    <module>org.maven.ide.eclipse.modello.tests</module>
    <module>org.maven.ide.eclipse.plexus.annotations</module>
    <module>org.maven.ide.eclipse.plexus.annotations.tests</module>
    <module>org.maven.ide.eclipse.temporary.mojos</module>

    <module>org.maven.ide.eclipse.temporary.mojos.feature</module>
    <module>org.maven.ide.eclipse.site-extras</module>
  </modules>

  <repositories>
    <repository>
      <id>galileo</id>
      <layout>p2</layout>
      <url>http://download.eclipse.org/releases/galileo</url>
    </repository>

    <repository>
      <id>m2e</id>
      <layout>p2</layout>
      <url>http://repository.sonatype.org/content/sites/forge-sites/m2e/${m2eclipse-core.version}</url>
    </repository>
  </repositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.sonatype.tycho</groupId>
        <artifactId>tycho-maven-plugin</artifactId>
        <version>${tycho-version}</version>
        <extensions>true</extensions>
      </plugin>

      <plugin>
        <groupId>org.sonatype.tycho</groupId>
        <artifactId>target-platform-configuration</artifactId>
        <version>${tycho-version}</version>
        <configuration>
          <resolver>p2</resolver>
          <ignoreTychoRepositories>true</ignoreTychoRepositories>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.sonatype.tycho</groupId>
          <artifactId>maven-osgi-test-plugin</artifactId>
          <version>${tycho-version}</version>
          <configuration>
            <useUIHarness>true</useUIHarness>
            <includes>
              <include>**/*Test.java</include>
            </includes>
            <argLine>${tycho.test.jvmArgs}</argLine>
            <!-- kill test JVM it tests take more than 10 minutes (600 seconds) 
              to finish -->
            <forkedProcessTimeoutInSeconds>7200</forkedProcessTimeoutInSeconds>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>sun-jvm</id>
      <activation>
        <property>
          <name>java.vendor.url</name>
          <value>http://java.sun.com/</value>
        </property>
      </activation>
      <properties>
        <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m</tycho.test.jvmArgs>
      </properties>
    </profile>
    <profile>
      <id>osx</id>
      <activation>
        <property>
          <name>java.vendor.url</name>
          <value>http://www.apple.com/</value>
        </property>
      </activation>
      <properties>
        <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dosgi.ws=cocoa -XstartOnFirstThread</tycho.test.jvmArgs>
        <osgi.ws>cocoa</osgi.ws>
      </properties>
    </profile>
    <profile>
      <id>sign</id>
      <activation>
        <property><name>jarsigner.alias</name></property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jarsigner-plugin</artifactId>
            <version>1.2</version>
            <executions>
              <execution>
                <id>sign</id>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
