Bug 573166 Build stand-alone MAT packages with a newer Eclipse release

Explicitly set product

Change-Id: I3081896f2c1f4030bca6207ec04f97e496e20716
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=573166
diff --git a/org.eclipse.mat.product/mat-1.p2.inf b/org.eclipse.mat.product/mat-1.p2.inf
new file mode 100644
index 0000000..1315b71
--- /dev/null
+++ b/org.eclipse.mat.product/mat-1.p2.inf
@@ -0,0 +1,14 @@
+requires.2.namespace = org.eclipse.equinox.p2.iu

+requires.2.name = org.eclipse.ui.themes

+requires.2.range = [1.0.0, 2.0.0)

+instructions.configure=\

+    org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/readme);\

+    org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/artifacts.xml);\

+    addRepository(type:0,name:Memory Analyzer,location:http${#58}//download.eclipse.org/mat/latest/update-site/);\

+    addRepository(type:1,name:Memory Analyzer,location:http${#58}//download.eclipse.org/mat/latest/update-site/);\

+    addRepository(type:0,name:Memory Analyzer latest development build,location:http${#58}//download.eclipse.org/mat/snapshots/update-site/,enabled:false);\

+    addRepository(type:1,name:Memory Analyzer latest development build,location:http${#58}//download.eclipse.org/mat/snapshots/update-site/,enabled:false);\

+    addRepository(type:0,name:Eclipse 2021-06,location:http${#58}//download.eclipse.org/releases/2021-06/,enabled:true);\

+    addRepository(type:1,name:Eclipse 2021-06,location:http${#58}//download.eclipse.org/releases/2021-06/,enabled:true);\

+    addRepository(type:0,name:IBM Diagnostic Tool Framework for Java,location:http${#58}//public.dhe.ibm.com/ibmdl/export/pub/software/websphere/runtimes/tools/dtfj/);\

+    addRepository(type:1,name:IBM Diagnostic Tool Framework for Java,location:http${#58}//public.dhe.ibm.com/ibmdl/export/pub/software/websphere/runtimes/tools/dtfj/)

diff --git a/org.eclipse.mat.product/mat-1.product b/org.eclipse.mat.product/mat-1.product
new file mode 100644
index 0000000..48ed1b9
--- /dev/null
+++ b/org.eclipse.mat.product/mat-1.product
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<?pde version="3.5"?>

+

+<product name="Memory Analyzer Tool" uid="org.eclipse.mat.ui.rcp.MemoryAnalyzer" id="org.eclipse.mat.ui.rcp.MemoryAnalyzer" application="org.eclipse.mat.ui.rcp.application" version="1.12.0" useFeatures="true" includeLaunchers="true">

+

+   <aboutInfo>

+      <image path="/org.eclipse.mat.ui.rcp/icons/eclipse_lg.gif"/>

+      <text>

+         Eclipse Memory Analyzer
+
+Version: 1.12.0
+
+Copyright (c) 2008, 2021 SAP AG, IBM Corporation and others.

+

+Visit http://www.eclipse.org/mat

+      </text>

+   </aboutInfo>

+

+   <configIni use="default">

+   </configIni>

+

+   <launcherArgs>

+      <vmArgs>-Xmx1024m</vmArgs>

+      <vmArgsMac>-Dorg.eclipse.swt.internal.carbon.smallFonts

+-XstartOnFirstThread</vmArgsMac>

+   </launcherArgs>

+

+   <windowImages i16="/org.eclipse.mat.ui.rcp/icons/memory_analyzer_16.gif" i32="/org.eclipse.mat.ui.rcp/icons/memory_analyzer_32.gif"/>

+

+   <splash

+      location="org.eclipse.mat.ui.rcp"

+      startupProgressRect="5,275,445,15"

+      startupMessageRect="7,252,445,20"

+      startupForegroundColor="000000" />

+   <launcher name="MemoryAnalyzer">

+      <macosx icon="../plugins/org.eclipse.mat.ui.rcp/icons/memory_analyzer.icns"/>

+      <win useIco="false">

+         <bmp/>

+      </win>

+   </launcher>

+

+   <intro introId="org.eclipse.mat.ui.rcp.Intro"/>

+

+   <vm>

+   </vm>

+

+   <license>

+        <text>

+Eclipse Foundation Software User Agreement

+

+November 22, 2017

+

+Usage Of Content

+

+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION

+AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF

+THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE

+TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED

+BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED

+BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE

+AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE

+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY

+APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU

+MAY NOT USE THE CONTENT.

+

+Applicable Licenses

+

+Unless otherwise indicated, all Content made available by the Eclipse Foundation

+is provided to you under the terms and conditions of the Eclipse Public License

+Version 2.0 ("EPL"). A copy of the EPL is provided with this Content and is also

+available at http://www.eclipse.org/legal/epl-2.0. For purposes of the EPL,

+"Program" will mean the Content.

+

+Content includes, but is not limited to, source code, object code, documentation

+and other files maintained in the Eclipse Foundation source code repository

+("Repository") in software modules ("Modules") and made available as

+downloadable archives ("Downloads").

+

+-   Content may be structured and packaged into modules to facilitate

+    delivering, extending, and upgrading the Content. Typical modules may

+    include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and

+    features ("Features").

+-   Each Plug-in or Fragment may be packaged as a sub-directory or JAR

+    (Java™ ARchive) in a directory named "plugins".

+-   A Feature is a bundle of one or more Plug-ins and/or Fragments and

+    associated material. Each Feature may be packaged as a sub-directory in a

+    directory named "features". Within a Feature, files named "feature.xml" may

+    contain a list of the names and version numbers of the Plug-ins and/or

+    Fragments associated with that Feature.

+-   Features may also include other Features ("Included Features"). Within a

+    Feature, files named "feature.xml" may contain a list of the names and

+    version numbers of Included Features.

+

+The terms and conditions governing Plug-ins and Fragments should be contained in

+files named "about.html" ("Abouts"). The terms and conditions governing Features

+and Included Features should be contained in files named "license.html"

+("Feature Licenses"). Abouts and Feature Licenses may be located in any

+directory of a Download or Module including, but not limited to the following

+locations:

+

+-   The top-level (root) directory

+-   Plug-in and Fragment directories

+-   Inside Plug-ins and Fragments packaged as JARs

+-   Sub-directories of the directory named "src" of certain Plug-ins

+-   Feature directories

+

+Note: if a Feature made available by the Eclipse Foundation is installed using

+the Provisioning Technology (as defined below), you must agree to a license

+("Feature Update License") during the installation process. If the Feature

+contains Included Features, the Feature Update License should either provide you

+with the terms and conditions governing the Included Features or inform you

+where you can locate them. Feature Update Licenses may be found in the "license"

+property of files named "feature.properties" found within a Feature. Such

+Abouts, Feature Licenses, and Feature Update Licenses contain the terms and

+conditions (or references to such terms and conditions) that govern your use of

+the associated Content in that directory.

+

+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL

+OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE

+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

+

+-   Eclipse Public License Version 1.0 (available at

+    http://www.eclipse.org/legal/epl-v10.html)

+-   Eclipse Distribution License Version 1.0 (available at

+    http://www.eclipse.org/licenses/edl-v1.0.html)

+-   Common Public License Version 1.0 (available at

+    http://www.eclipse.org/legal/cpl-v10.html)

+-   Apache Software License 1.1 (available at

+    http://www.apache.org/licenses/LICENSE)

+-   Apache Software License 2.0 (available at

+    http://www.apache.org/licenses/LICENSE-2.0)

+-   Mozilla Public License Version 1.1 (available at

+    http://www.mozilla.org/MPL/MPL-1.1.html)

+

+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO

+USE OF THE CONTENT. If no About, Feature License, or Feature Update License is

+provided, please contact the Eclipse Foundation to determine what terms and

+conditions govern that particular Content.

+

+Use of Provisioning Technology

+

+The Eclipse Foundation makes available provisioning software, examples of which

+include, but are not limited to, p2 and the Eclipse Update Manager

+("Provisioning Technology") for the purpose of allowing users to install

+software, documentation, information and/or other materials (collectively

+"Installable Software"). This capability is provided with the intent of allowing

+such users to install, extend and update Eclipse-based products. Information

+about packaging Installable Software is available at

+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").

+

+You may use Provisioning Technology to allow other parties to install

+Installable Software. You shall be responsible for enabling the applicable

+license agreements relating to the Installable Software to be presented to, and

+accepted by, the users of the Provisioning Technology in accordance with the

+Specification. By using Provisioning Technology in such a manner and making it

+available in accordance with the Specification, you further acknowledge your

+agreement to, and the acquisition of all necessary rights to permit the

+following:

+

+1.  A series of actions may occur ("Provisioning Process") in which a user may

+    execute the Provisioning Technology on a machine ("Target Machine") with the

+    intent of installing, extending or updating the functionality of an

+    Eclipse-based product.

+2.  During the Provisioning Process, the Provisioning Technology may cause third

+    party Installable Software or a portion thereof to be accessed and copied to

+    the Target Machine.

+3.  Pursuant to the Specification, you will provide to the user the terms and

+    conditions that govern the use of the Installable Software ("Installable

+    Software Agreement") and such Installable Software Agreement shall be

+    accessed from the Target Machine in accordance with the Specification. Such

+    Installable Software Agreement must inform the user of the terms and

+    conditions that govern the Installable Software and must solicit acceptance

+    by the end user in the manner prescribed in such Installable

+    Software Agreement. Upon such indication of agreement by the user, the

+    provisioning Technology will complete installation of the

+    Installable Software.

+

+Cryptography

+

+Content may contain encryption software. The country in which you are currently

+may have restrictions on the import, possession, and use, and/or re-export to

+another country, of encryption software. BEFORE using any encryption software,

+please check the country's laws, regulations and policies concerning the import,

+possession, or use, and re-export of encryption software, to see if this is

+permitted.

+

+Java and all Java-based trademarks are trademarks of Oracle Corporation in the

+United States, other countries, or both.

+         </text>

+   </license>

+

+   <copyright>

+Copyright (c) 2008, 2021 SAP AG, IBM Corporation and others.

+

+This program and the accompanying materials are made available under the

+terms of the Eclipse Public License 2.0 which is available at

+http://www.eclipse.org/legal/epl-2.0

+   </copyright>

+

+   <plugins>

+   </plugins>

+

+   <features>

+      <feature id="org.eclipse.mat.ui.rcp.feature" installMode="root"/>

+      <feature id="org.eclipse.rcp"/>

+      <feature id="org.eclipse.equinox.p2.user.ui"/>

+      <feature id="org.eclipse.help"/>

+   </features>

+

+   <configurations>

+      <plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />

+      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />

+      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />

+      <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />

+      <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />

+

+      <property name="cssTheme" value="org.eclipse.e4.ui.css.theme.e4_default" />

+      <property name="osgi.requiredJavaVersion" value="11" />

+      <property name="applicationCSSResources" value="platform:/plugin/org.eclipse.platform/images/" />

+      <property name="org.eclipse.update.reconcile" value="false" />

+   </configurations>

+

+</product>

diff --git a/org.eclipse.mat.product/pom.xml b/org.eclipse.mat.product/pom.xml
index 2af926a..9baac12 100644
--- a/org.eclipse.mat.product/pom.xml
+++ b/org.eclipse.mat.product/pom.xml
@@ -35,6 +35,7 @@
 	</properties>

 	<build>

 		<plugins>

+			<!--  Experiment to choose a product / p2.inf pair

 			<plugin>

 				<groupId>org.apache.maven.plugins</groupId>

 				<artifactId>maven-antrun-plugin</artifactId>

@@ -48,7 +49,7 @@
 						</goals>

 						<configuration>

 							<target>

-								<!--  Make the selected product the first alphabetically -->

+								<! 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>

@@ -56,6 +57,7 @@
 					</execution>

 				</executions>

 			</plugin>

+			-->

 			<plugin>

 				<groupId>org.eclipse.tycho</groupId>

 				<artifactId>tycho-p2-director-plugin</artifactId>