<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <version.tycho>1.2.0</version.tycho>
    <version.emf>2.13</version.emf>
    <p2.emf>https://download.eclipse.org/modeling/emf/emf/builds/release/${version.emf}</p2.emf>
  </properties>

  <groupId>org.eclipse.emf</groupId>
  <artifactId>org.eclipse.emf.releng.publish</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>eclipse-feature</packaging>

  <build>
    <defaultGoal>clean resources:resources verify</defaultGoal>
    <resources>
      <resource>
        <directory>aggr</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-maven-plugin</artifactId>
        <version>${version.tycho}</version>
        <extensions>true</extensions>
      </plugin>
      <plugin>
        <groupId>org.eclipse.tycho.extras</groupId>
        <artifactId>tycho-eclipserun-plugin</artifactId>
        <version>${version.tycho}</version>
        <executions>
          <execution>
            <goals>
              <goal>eclipse-run</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
        <configuration>
          <!-- DO NOT FORMAT THE FOLLOWING LINE, IT MUST BE ON ONE LINE -->
          <appArgLine>-application org.eclipse.cbi.p2repo.cli.headless aggregate --buildModel target/classes/EMF.aggr</appArgLine>
          <dependencies>
            <dependency>
              <artifactId>org.eclipse.cbi.p2repo.aggregator.engine.feature</artifactId>
              <type>eclipse-feature</type>
            </dependency>
            <dependency>
              <artifactId>org.eclipse.equinox.core.feature</artifactId>
              <type>eclipse-feature</type>
            </dependency>
            <dependency>
              <artifactId>org.eclipse.equinox.p2.core.feature</artifactId>
              <type>eclipse-feature</type>
            </dependency>
          </dependencies>
          <repositories>
            <repository>
              <id>cbi-aggregator</id>
              <layout>p2</layout>
              <url>https://download.eclipse.org/cbi/updates/aggregator/headless/4.8/I20180518-0759</url>
            </repository>
          </repositories>
          <executionEnvironment>JavaSE-1.8</executionEnvironment>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-packaging-plugin</artifactId>
        <version>${version.tycho}</version>
        <configuration>
          <strictBinIncludes>false</strictBinIncludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>target-platform-configuration</artifactId>
        <version>${version.tycho}</version>
        <configuration>
          <environments>
            <environment>
              <os>win32</os>
              <ws>win32</ws>
              <arch>x86_64</arch>
            </environment>
            <environment>
              <os>macosx</os>
              <ws>cocoa</ws>
              <arch>x86_64</arch>
            </environment>
            <environment>
              <os>linux</os>
              <ws>gtk</ws>
              <arch>x86_64</arch>
            </environment>
          </environments>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <profiles>
    <!-- Use EMF CI Build p2 repository when EMF version 'I_BUILD' is selected -->
    <profile>
      <id>I_BUILD</id>
      <activation>
        <property>
          <name>version.emf</name>
          <value>I_BUILD</value>
        </property>
      </activation>
      <properties>
        <p2.emf>https://download.eclipse.org/modeling/emf/emf/builds/nightly/latest</p2.emf>
      </properties>
    </profile>

  </profiles>
</project>
