blob: 7601bfba478b492b42d42dc9b8b61dfa5ace4dff [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2023 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.15.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>
<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>
<configuration>
<formats>
<linux>zip</linux>
<macosx>zip</macosx>
</formats>
</configuration>
</execution>
</executions>
<configuration>
<products>
<product>
<id>org.eclipse.mat.ui.rcp.MemoryAnalyzer</id>
<rootFolder>mat</rootFolder>
<rootFolders>
<macosx>MemoryAnalyzer.app</macosx>
</rootFolders>
</product>
</products>
</configuration>
</plugin>
<!--
Experiment to choose a product / p2.inf pair.
Have this after tycho-p2-director plugin so that later uses of this plugin
in the package phase execute after materialize-products
-->
<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 p2.inf the one for use with mat.product -->
<copy file="${project.basedir}/${mat-product}.p2.inf" tofile="${project.basedir}/mat.p2.inf" overwrite="true" />
</target>
</configuration>
</execution>
</executions>
</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-x86_64</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/x86_64/MemoryAnalyzer.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/x86_64/MemoryAnalyzer.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>tidyp2-aarch64</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/aarch64/MemoryAnalyzer.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/aarch64/MemoryAnalyzer.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>MemoryAnalyzerc.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>MemoryAnalyzer.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>
<id>dmg-package-mat-x86_64</id>
<goals>
<goal>package-dmg</goal>
</goals>
<phase>integration-test</phase>
<configuration>
<source>${project.build.directory}/products/org.eclipse.mat.ui.rcp.MemoryAnalyzer-macosx.cocoa.x86_64.zip</source>
<timeoutMillis>600000</timeoutMillis> <!-- 10 min -->
<continueOnFail>${macSigner.forceContinue}</continueOnFail>
<sign>true</sign>
</configuration>
</execution>
<execution>
<id>dmg-package-mat-aarch64</id>
<goals>
<goal>package-dmg</goal>
</goals>
<phase>integration-test</phase>
<configuration>
<source>${project.build.directory}/products/org.eclipse.mat.ui.rcp.MemoryAnalyzer-macosx.cocoa.aarch64.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>