blob: 44d9d26d16410d22da762eceef398fec299e9c7e [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2022 SAP AG.
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:
SAP AG - initial API and 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>
<groupId>org.eclipse.mat</groupId>
<artifactId>parent</artifactId>
<relativePath>../parent</relativePath>
<version>1.13.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.mat.product</artifactId>
<packaging>eclipse-repository</packaging>
<name>MAT RCP</name>
<properties>
<!-- chose .product file -->
<productFile>${mat-product}.product</productFile>
<productConfiguration>${project.basedir}/${productFile}</productConfiguration>
</properties>
<build>
<plugins>
<!-- Experiment to choose a product / p2.inf pair
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>selectproduct</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<! Make the selected product the first alphabetically >
<copy file="${project.basedir}/${mat-product}.product" tofile="${project.basedir}/mat.product" />
<copy file="${project.basedir}/${mat-product}.p2.inf" tofile="${project.basedir}/mat.p2.inf" />
</target>
</configuration>
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>materialize-products</id>
<goals>
<goal>materialize-products</goal>
</goals>
<phase>package</phase>
</execution>
<execution>
<id>archive-products</id>
<goals>
<goal>archive-products</goal>
</goals>
<phase>pre-integration-test</phase>
</execution>
</executions>
<configuration>
<products>
<product>
<id>org.eclipse.mat.ui.rcp.MemoryAnalyzer</id>
<rootFolder>mat</rootFolder>
</product>
</products>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>build-server</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>tidyp2</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Remove unneeded executable -->
<delete includeemptydirs="false" failonerror="false">
<fileset dir="${project.build.directory}/products/org.eclipse.mat.ui.rcp.MemoryAnalyzer/macosx/cocoa/${arch}/mat.app/Contents/Eclipse/p2/org.eclipse.equinox.p2.core/cache/">
<include name="**" />
</fileset>
</delete>
<!-- Sign library -->
<first id="eclipse.so">
<fileset dir="${project.build.directory}/products/org.eclipse.mat.ui.rcp.MemoryAnalyzer/macosx/cocoa/${arch}/mat.app/Contents/Eclipse/plugins" includes="**/*.so" />
</first>
<exec dir="${project.build.directory}" executable="curl">
<arg value="--output"/>
<arg value="${toString:eclipse.so}"/>
<arg value="--form"/>
<arg value="file=@${toString:eclipse.so}"/>
<arg value="--silent"/>
<arg value="--show-error"/>
<arg value="--fail"/>
<arg value="https://cbi.eclipse.org/macos/codesign/sign"/>
</exec>
</target>
</configuration>
</execution>
<!--
<execution>
<id>publish</id>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<delete includeemptydirs="false">
<fileset dir="${download-publish-rcp-path}">
<include name="**" />
</fileset>
</delete>
<copy includeemptydirs="false" todir="${download-publish-rcp-path}">
<fileset dir="target/products">
<include name="*.zip" />
<include name="*.dmg" />
</fileset>
</copy>
</target>
</configuration>
</execution>
-->
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.cbi.maven.plugins</groupId>
<artifactId>eclipse-winsigner-plugin</artifactId>
<version>${cbi-plugins.version}</version>
<executions>
<execution>
<goals>
<goal>sign</goal>
</goals>
<phase>package</phase>
<configuration>
<fileNames>
<fileName>MemoryAnalyzer.exe</fileName>
<fileName>eclipsec.exe</fileName>
</fileNames>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.cbi.maven.plugins</groupId>
<artifactId>eclipse-macsigner-plugin</artifactId>
<version>${cbi-plugins.version}</version>
<executions>
<execution>
<goals>
<goal>sign</goal>
</goals>
<phase>package</phase>
<configuration>
<fileNames>
<fileName>mat.app</fileName>
</fileNames>
<timeoutMillis>300000</timeoutMillis> <!-- 5 min -->
<continueOnFail>${macSigner.forceContinue}</continueOnFail>
<entitlements>${project.basedir}/mat.entitlement</entitlements>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.cbi.maven.plugins</groupId>
<artifactId>eclipse-dmg-packager</artifactId>
<version>${cbi-plugins.version}</version>
<executions>
<execution>
<goals>
<goal>package-dmg</goal>
</goals>
<phase>integration-test</phase>
<configuration>
<source>${project.build.directory}/products/org.eclipse.mat.ui.rcp.MemoryAnalyzer-macosx.cocoa.${arch}.zip</source>
<timeoutMillis>600000</timeoutMillis> <!-- 10 min -->
<continueOnFail>${macSigner.forceContinue}</continueOnFail>
<sign>true</sign>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>2.0.0</version>
<executions>
<execution>
<id>prepare-publish-rcp</id>
<phase>deploy</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<url>scpexe://${download-remote-publish-rcp-path}</url>
<commands>
<command>rm -rf ${download-publish-rcp-path}/*</command>
</commands>
</configuration>
</execution>
<execution>
<id>publish-rcp</id>
<phase>deploy</phase>
<goals>
<goal>upload</goal>
</goals>
<configuration>
<fromDir>target/products</fromDir>
<includes>*.zip,*.dmg</includes>
<url>scpexe://${download-remote-publish-rcp-path}</url>
<toDir></toDir>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>