<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright (c) 2011, 2019 Ericsson

   All rights reserved. This program and the accompanying materials
   are made available under the terms of the Eclipse Public License 2.0
   which accompanies this distribution, and is available at
   https://www.eclipse.org/legal/epl-2.0/

   SPDX-License-Identifier: EPL-2.0

   Contributors:
       Ericsson - initial implementation
-->

<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>
    <artifactId>org.eclipse.tracecompass.releng-parent</artifactId>
    <groupId>org.eclipse.tracecompass</groupId>
    <version>7.0.0-SNAPSHOT</version>
  </parent>

  <artifactId>org.eclipse.tracecompass.releng-site</artifactId>
  <name>Trace Compass Repository</name>
  <packaging>eclipse-repository</packaging>

<build>
  <plugins>
    <plugin>
      <groupId>org.jboss.tools.tycho-plugins</groupId>
      <artifactId>repository-utils</artifactId>
      <executions>
        <execution>
          <id>generate-facade</id>
          <phase>package</phase>
          <goals>
            <goal>generate-repository-facade</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <removeDefaultCategory>true</removeDefaultCategory>
        <skipWebContentGeneration>true</skipWebContentGeneration>
        <skipBuildInfo>true</skipBuildInfo>
      </configuration>
    </plugin>
  </plugins>
</build>

<profiles>
  <profile>
    <id>deploy-update-site</id>
    <properties>
      <siteDestination>/home/data/httpd/download.eclipse.org/tracecompass/master/repository/</siteDestination>
    </properties>
    <build>
      <plugins>
        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.8</version>
          <executions>
            <execution>
              <id>deploy</id>
              <phase>install</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                <target>
                  <delete includeemptydirs="false">
                    <fileset
                      dir="${siteDestination}">
                      <include name="**" />
                    </fileset>
                  </delete>
                  <copy includeemptydirs="false"
                    todir="${siteDestination}">
                    <fileset dir="target/repository">
                      <include name="**" />
                    </fileset>
                  </copy>
                </target>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </build>
  </profile>
</profiles>

</project>
