[582988] Introduce JustJ promotion/site management
diff --git a/releng/org.eclipse.ocl.releng.build-site/justj-promoter.properties b/releng/org.eclipse.ocl.releng.build-site/justj-promoter.properties
new file mode 100644
index 0000000..8208be2
--- /dev/null
+++ b/releng/org.eclipse.ocl.releng.build-site/justj-promoter.properties
@@ -0,0 +1,34 @@
+###############################################################################
+# Copyright (c) 2023 Willink Transformations and others.
+#
+# 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:
+# E.D.Willink - initial API and implementation
+###############################################################################
+# OCL publisher properties for use by the justj-promoter job:
+#
+# Since JustJ cannot accept an https promote specification
+# the source job must wrap up the P2 repo using an execute step post-Maven
+#
+# cd releng/org.eclipse.ocl.releng.build-site/target/repository
+# zip -qr ../../../../p2repo.zip .
+#
+# the promoter unwraps the P2 repo using an execute step pre-Maven
+#
+# curl -s -k ${BUILD_PROMOTE} > p2repo.zip
+# unzip -q p2repo.zip -d p2repo
+#
+BUILD_COMMIT=-commit https://git.eclipse.org/c/ocl/org.eclipse.ocl.git/commit/?id=${env.GIT_COMMIT}
+BUILD_PROMOTE=${env.BUILD_URL}artifact/p2repo.zip
+BUILD_REMOTE=-remote genie.ocl@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/modeling.mdt/ocl
+BUILD_ROOT=/home/jenkins/agent/workspace/justj-promoter/justj-sync
+# -- need a way to strip the - character
+#BUILD_TIMESTAMP=${buildTimestamp}
+BUILD_TIMESTAMP=
+BUILD_TYPE=${env.BUILD_TYPE}
diff --git a/releng/org.eclipse.ocl.releng.build-site/pom.xml b/releng/org.eclipse.ocl.releng.build-site/pom.xml
index 2342cca..41bbd00 100644
--- a/releng/org.eclipse.ocl.releng.build-site/pom.xml
+++ b/releng/org.eclipse.ocl.releng.build-site/pom.xml
@@ -33,6 +33,7 @@
<filtering>true</filtering>
<includes>
<include>publisher.properties</include>
+ <include>justj-promoter.properties</include>
</includes>
</resource>
<resource>
diff --git a/releng/org.eclipse.ocl.releng.promote/.gitignore b/releng/org.eclipse.ocl.releng.promote/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/releng/org.eclipse.ocl.releng.promote/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/releng/org.eclipse.ocl.releng.promote/.project b/releng/org.eclipse.ocl.releng.promote/.project
new file mode 100644
index 0000000..64ed284
--- /dev/null
+++ b/releng/org.eclipse.ocl.releng.promote/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.ocl.releng.promote</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
diff --git a/releng/org.eclipse.ocl.releng.promote/.settings/org.eclipse.core.resources.prefs b/releng/org.eclipse.ocl.releng.promote/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/releng/org.eclipse.ocl.releng.promote/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/releng/org.eclipse.ocl.releng.promote/.settings/org.eclipse.core.runtime.prefs b/releng/org.eclipse.ocl.releng.promote/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/releng/org.eclipse.ocl.releng.promote/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/releng/org.eclipse.ocl.releng.promote/pom.xml b/releng/org.eclipse.ocl.releng.promote/pom.xml
new file mode 100644
index 0000000..6d2a939
--- /dev/null
+++ b/releng/org.eclipse.ocl.releng.promote/pom.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.eclipse.ocl</groupId>
+ <artifactId>org.eclipse.ocl.releng.promote</artifactId>
+ <version>6.20.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <!-- based on releng/org.eclipse.nebula.site/promotion/pom.xml and https://eclipse.dev/justj/?page=tools -->
+ <properties>
+ <tycho-version>4.0.5</tycho-version>
+ <tycho-extras-version>${tycho-version}</tycho-extras-version>
+
+ <!--
+ Overrideable parameters - defaults here might suit usage as part of a total build, but we
+ promote separately and only if the build succeeds, so overrides are probably necessary.
+
+ The "Build OCL Promote Test"" launch allows some testing locally.
+
+ The "JustJ for OCL" Eclipse launch supports regular Java debugging."
+ -->
+ <BUILD_COMMIT>-commit https://git.eclipse.org/r/ocl/org.eclipse.ocl.git/commit/?id=${env.GIT_COMMIT}</BUILD_COMMIT>
+ <BUILD_PROMOTE>${org.eclipse.justj.p2.manager.build.url}</BUILD_PROMOTE>
+ <BUILD_REMOTE>-remote genie.ocl@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/modeling.mdt/ocl</BUILD_REMOTE>
+ <BUILD_ROOT>${project.build.directory}/justj-sync</BUILD_ROOT>
+ <BUILD_TIMESTAMP></BUILD_TIMESTAMP>
+ <!--BUILD_TIMESTAMP>-timestamp ${build.timestamp}</BUILD_TIMESTAMP-->
+ <BUILD_TYPE>${build.type}</BUILD_TYPE>
+
+
+ <eclipse.repo>https://download.eclipse.org/releases/latest</eclipse.repo>
+ <justj.tools.repo>https://download.eclipse.org/justj/tools/updates/nightly/latest</justj.tools.repo>
+ <org.eclipse.justj.p2.manager.args></org.eclipse.justj.p2.manager.args>
+ <maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
+ <org.eclipse.justj.p2.manager.build.url>https://ci.eclipse.org/ocl/job/ocl-master/lastSuccessfulBuild</org.eclipse.justj.p2.manager.build.url>
+
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-eclipserun-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <executionEnvironment>JavaSE-17</executionEnvironment>
+ <dependencies>
+ <dependency>
+ <artifactId>org.eclipse.justj.p2</artifactId>
+ <type>eclipse-plugin</type>
+ </dependency>
+ <dependency>
+ <artifactId>org.apache.felix.scr</artifactId>
+ <type>eclipse-plugin</type>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>eclipse.repo</id>
+ <layout>p2</layout>
+ <url>${eclipse.repo}</url>
+ </repository>
+ <repository>
+ <id>justj.tools.repo</id>
+ <layout>p2</layout>
+ <url>${justj.tools.repo}</url>
+ </repository>
+ </repositories>
+ </configuration>
+ <executions>
+ <execution>
+ <id>promote</id>
+ <goals>
+ <goal>eclipse-run</goal>
+ </goals>
+ <phase>verify</phase>
+ <configuration>
+ <argLine></argLine>
+ <appArgLine>
+ -consoleLog
+ -application org.eclipse.justj.p2.manager
+ -data @None
+ -nosplash
+ ${org.eclipse.justj.p2.manager.args}
+ ${BUILD_REMOTE}
+ -retain 5
+ -label "OCL"
+ -build-url ${org.eclipse.justj.p2.manager.build.url}
+ -root ${BUILD_ROOT}
+ -relative builds
+ -version-iu org.eclipse.ocl.examples.feature.group
+ ${BUILD_COMMIT}
+ -target-url https://download.eclipse.org/modeling/mdt/ocl
+ -promote ${BUILD_PROMOTE}
+ ${BUILD_TIMESTAMP}
+ -type ${BUILD_TYPE}
+ -breadcrumb "OCL https://projects.eclipse.org/projects/modeling.mdt.ocl"
+ -mapping ocl->OCL
+ ${org.eclipse.justj.p2.manager.extra.args}
+ </appArgLine>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
diff --git a/releng/org.eclipse.ocl.releng.tycho/.launches/Build OCL Promote Test.launch b/releng/org.eclipse.ocl.releng.tycho/.launches/Build OCL Promote Test.launch
new file mode 100644
index 0000000..3dad972
--- /dev/null
+++ b/releng/org.eclipse.ocl.releng.tycho/.launches/Build OCL Promote Test.launch
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
+ <intAttribute key="M2_COLORS" value="0"/>
+ <booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
+ <stringAttribute key="M2_GOALS" value="clean verify"/>
+ <booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
+ <booleanAttribute key="M2_OFFLINE" value="false"/>
+ <stringAttribute key="M2_PROFILES" value=""/>
+ <listAttribute key="M2_PROPERTIES">
+ <listEntry value="BUILD_TYPE=nightly"/>
+ <listEntry value="BUILD_ROOT=C:/Temp/ocl-sync"/>
+ <listEntry value="BUILD_PROMOTE=E:\GIT\org.eclipse.ocl\releng\org.eclipse.qvto.releng.promote/../org.eclipse.ocl.releng.build-site/target/repository"/>
+ <listEntry value="BUILD_REMOTE=-mapping dummyRemote->dummyRemote"/>
+ <listEntry value="BUILD_COMMIT=-mapping dummyCommit->dummyCommit"/>
+ </listAttribute>
+ <stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
+ <booleanAttribute key="M2_SKIP_TESTS" value="false"/>
+ <intAttribute key="M2_THREADS" value="1"/>
+ <booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
+ <stringAttribute key="M2_USER_SETTINGS" value=""/>
+ <booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
+ <booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
+ <booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
+ <booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
+ <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
+ <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
+ <stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:/org.eclipse.ocl.releng.promote}"/>
+</launchConfiguration>
diff --git a/releng/org.eclipse.ocl.releng.tycho/.launches/JustJ for OCL.launch b/releng/org.eclipse.ocl.releng.tycho/.launches/JustJ for OCL.launch
new file mode 100644
index 0000000..5fc3128
--- /dev/null
+++ b/releng/org.eclipse.ocl.releng.tycho/.launches/JustJ for OCL.launch
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+ <booleanAttribute key="append.args" value="true"/>
+ <stringAttribute key="application" value="org.eclipse.justj.p2.manager"/>
+ <booleanAttribute key="askclear" value="true"/>
+ <booleanAttribute key="automaticAdd" value="true"/>
+ <booleanAttribute key="automaticValidate" value="true"/>
+ <stringAttribute key="bootstrap" value=""/>
+ <stringAttribute key="checked" value="[NONE]"/>
+ <booleanAttribute key="clearConfig" value="true"/>
+ <booleanAttribute key="clearws" value="false"/>
+ <booleanAttribute key="clearwslog" value="false"/>
+ <stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/JustJ for OCL"/>
+ <booleanAttribute key="default" value="true"/>
+ <booleanAttribute key="includeOptional" value="true"/>
+ <stringAttribute key="location" value="${workspace_loc}/../runtime-JustJforOCL"/>
+ <booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
+ <booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
+ <booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
+ <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+ <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
+ <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -retain 50 -label OCL -build-url https://download.eclipse.org/modeling/mdt/ocl/updates/releases/6.18.0/ -root C:/Temp/ocl-sync -relative builds -version-iu org.eclipse.ocl.all.sdk.feature.group -target-url https://download.eclipse.org/modeling/mdt/ocl -promote E:\GIT\org.eclipse.ocl\releng\org.eclipse.ocl.releng.promote/../org.eclipse.ocl.releng.build-site/target/repository -type milestone -breadcrumb OCL https://projects.eclipse.org/projects/modeling.modeling.mdt.ocl/downloads"/>
+ <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+ <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true"/>
+ <stringAttribute key="pde.version" value="3.3"/>
+ <stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+ <booleanAttribute key="show_selected_only" value="false"/>
+ <stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+ <booleanAttribute key="tracing" value="false"/>
+ <booleanAttribute key="useCustomFeatures" value="false"/>
+ <booleanAttribute key="useDefaultConfig" value="true"/>
+ <booleanAttribute key="useDefaultConfigArea" value="true"/>
+ <booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>