From a3fd560dd033f5332b2baa35d872154a18597dfe Mon Sep 17 00:00:00 2001 From: Stefan Kapferer Date: Fri, 9 Jun 2023 13:00:00 +0200 Subject: [PATCH] Migrate Eclipse update site from jFrog Artifactory to GitHub Page (#337) --- .github/workflows/build_master.yml | 11 +- .github/workflows/build_standard.yml | 1 - .github/workflows/release.yml | 11 +- .github/workflows/settings.xml | 12 -- org.contextmapper.dsl.feature/feature.xml | 2 +- .../META-INF/MANIFEST.MF | 4 +- .../META-INF/MANIFEST.MF | 6 +- org.contextmapper.dsl.ide/pom.xml | 2 +- .../artifactory.ant | 148 ------------------ org.contextmapper.dsl.repository/category.xml | 6 +- .../packaging-p2composite.ant | 94 ++++++++--- org.contextmapper.dsl.repository/pom.xml | 105 ++++++++++--- .../org.contextmapper.dsl.target.target | 38 ++--- .../META-INF/MANIFEST.MF | 6 +- org.contextmapper.dsl.ui.tests/.classpath | 5 - .../META-INF/MANIFEST.MF | 3 +- org.contextmapper.dsl/pom.xml | 22 +-- pom.xml | 40 +++-- 18 files changed, 230 insertions(+), 286 deletions(-) delete mode 100644 org.contextmapper.dsl.repository/artifactory.ant diff --git a/.github/workflows/build_master.yml b/.github/workflows/build_master.yml index e7b09297..d42868c9 100644 --- a/.github/workflows/build_master.yml +++ b/.github/workflows/build_master.yml @@ -127,10 +127,9 @@ jobs: ${{ runner.os }}-maven- - name: Grant execute permission for mvnw run: chmod +x mvnw + - name: Configure Git user + run: | + git config --global user.email "contextmapper-ci@kapferer.ch" + git config --global user.name "Context Mapper CI" - name: Publish Eclipse plugin to Snapshot Repo - run: ./mvnw --settings ./.github/workflows/settings.xml verify -Prelease-composite -DARTIFACTORY_REPO=context-mapper-eclipse-snapshot - env: - ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} - ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} - - + run: ./mvnw --settings ./.github/workflows/settings.xml clean deploy -Prelease-composite -Dgithub-update-repo=https://${{ secrets.GH_CI_USERNAME }}:${{ secrets.GH_CI_TOKEN }}@github.com/ContextMapper/eclipse-update-site-snapshots diff --git a/.github/workflows/build_standard.yml b/.github/workflows/build_standard.yml index 2f81b74b..bd9fbbcf 100644 --- a/.github/workflows/build_standard.yml +++ b/.github/workflows/build_standard.yml @@ -57,4 +57,3 @@ jobs: - name: Build with Maven run: ./mvnw clean verify - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a348f410..5b81e0a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -121,10 +121,9 @@ jobs: ${{ runner.os }}-maven- - name: Grant execute permission for mvnw run: chmod +x mvnw + - name: Configure Git user + run: | + git config --global user.email "contextmapper-ci@kapferer.ch" + git config --global user.name "Context Mapper CI" - name: Publish Eclipse plugin with Maven - run: ./mvnw --settings ./.github/workflows/settings.xml clean verify -Prelease-composite -DARTIFACTORY_REPO=context-mapper-eclipse - env: - ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} - ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} - - + run: ./mvnw --settings ./.github/workflows/settings.xml clean deploy -Prelease-composite -Dgithub-update-repo=https://${{ secrets.GH_CI_USERNAME }}:${{ secrets.GH_CI_TOKEN }}@github.com/ContextMapper/eclipse-update-site diff --git a/.github/workflows/settings.xml b/.github/workflows/settings.xml index f65d43c6..7aa91fb5 100644 --- a/.github/workflows/settings.xml +++ b/.github/workflows/settings.xml @@ -10,16 +10,4 @@ ${env.GH_CI_TOKEN} - - - release-composite - - false - - - ${env.ARTIFACTORY_USERNAME} - ${env.ARTIFACTORY_API_KEY} - - - diff --git a/org.contextmapper.dsl.feature/feature.xml b/org.contextmapper.dsl.feature/feature.xml index 7fccfa16..11442bf0 100644 --- a/org.contextmapper.dsl.feature/feature.xml +++ b/org.contextmapper.dsl.feature/feature.xml @@ -219,7 +219,7 @@ - + org.eclipse.lsp4j org.eclipse.lsp4j - 0.5.0 + 0.19.0 org.ow2.asm diff --git a/org.contextmapper.dsl.repository/artifactory.ant b/org.contextmapper.dsl.repository/artifactory.ant deleted file mode 100644 index c205ee75..00000000 --- a/org.contextmapper.dsl.repository/artifactory.ant +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.contextmapper.dsl.repository/category.xml b/org.contextmapper.dsl.repository/category.xml index cf3bbf23..140e74ca 100644 --- a/org.contextmapper.dsl.repository/category.xml +++ b/org.contextmapper.dsl.repository/category.xml @@ -19,7 +19,7 @@ - - - + + + diff --git a/org.contextmapper.dsl.repository/packaging-p2composite.ant b/org.contextmapper.dsl.repository/packaging-p2composite.ant index 9a2970fe..a1069c3f 100644 --- a/org.contextmapper.dsl.repository/packaging-p2composite.ant +++ b/org.contextmapper.dsl.repository/packaging-p2composite.ant @@ -1,35 +1,59 @@ - - - + - - + + + + + + + - - + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.contextmapper.dsl.repository/pom.xml b/org.contextmapper.dsl.repository/pom.xml index f48e8b9d..7f3e7b0f 100644 --- a/org.contextmapper.dsl.repository/pom.xml +++ b/org.contextmapper.dsl.repository/pom.xml @@ -9,14 +9,12 @@ eclipse-repository - ${ARTIFACTORY_REPO} - releases ContextMapper DSL Composite Site - contextmapper - releases - updates - zipped - ../../releases/ + ${GH_REPO_NAME} + git@github.com:ContextMapper/${github-repo-name}.git + ${project.build.directory}/checkout + ${github-local-clone}/releases + ${releases-directory}/${qualifiedVersion} @@ -91,7 +89,8 @@ 3.3.0 - initialize + + initialize parse-version parse-version @@ -100,33 +99,95 @@ - maven-antrun-plugin - ${maven-antrun-plugin.version} + org.codehaus.mojo + exec-maven-plugin + + git + - update-local-repository + git-clone prepare-package + + exec + - - - + + clone + --depth=1 + -b + master + ${github-update-repo} + ${github-local-clone} + + + + git-add + verify - run + exec + + + -C + ${github-local-clone} + add + -A + + - - deploy-repository + git-commit verify + + exec + + + + -C + ${github-local-clone} + commit + -m + Release ${qualifiedVersion} + + + + + git-push + deploy + + exec + - - - + + -C + ${github-local-clone} + push + origin + master + + + + + + maven-resources-plugin + + + copy-repository + package - run + copy-resources + + ${current-release-directory} + + + ${project.build.directory}/repository + + + @@ -138,7 +199,7 @@ - -application org.eclipse.ant.core.antRunner -buildfile packaging-p2composite.ant p2.composite.add -DparsedVersion.majorVersion="${parsedVersion.majorVersion}" -DparsedVersion.minorVersion="${parsedVersion.minorVersion}" -Dsite.label="${site.label}" -Dproject.build.directory=${project.build.directory} -DunqualifiedVersion=${unqualifiedVersion} -Dchild.repository.path.prefix="${child.repository.path.prefix}" + -application org.eclipse.ant.core.antRunner -buildfile packaging-p2composite.ant p2.composite.add -DparsedVersion.majorVersion="${parsedVersion.majorVersion}" -DparsedVersion.minorVersion="${parsedVersion.minorVersion}" -DbuildQualifier=${buildQualifier} -Dsite.label="${site.label}" -Dcomposite.base.dir=${github-local-clone} -DunqualifiedVersion=${unqualifiedVersion} -Dchild.repository.path.prefix="${child.repository.path.prefix}" --add-opens=java.base/java.net=ALL-UNNAMED diff --git a/org.contextmapper.dsl.target/org.contextmapper.dsl.target.target b/org.contextmapper.dsl.target/org.contextmapper.dsl.target.target index 8d236656..b075c40c 100644 --- a/org.contextmapper.dsl.target/org.contextmapper.dsl.target.target +++ b/org.contextmapper.dsl.target/org.contextmapper.dsl.target.target @@ -9,7 +9,7 @@ - + @@ -20,37 +20,37 @@ - - + + - - - - - - - - - - + + + + + + + + + + - - - + + + - + - + - + diff --git a/org.contextmapper.dsl.tests/META-INF/MANIFEST.MF b/org.contextmapper.dsl.tests/META-INF/MANIFEST.MF index 72ce5eac..faa64b34 100644 --- a/org.contextmapper.dsl.tests/META-INF/MANIFEST.MF +++ b/org.contextmapper.dsl.tests/META-INF/MANIFEST.MF @@ -16,10 +16,10 @@ Require-Bundle: org.contextmapper.dsl, org.contextmapper.servicecutter.library;bundle-version="1.2.1", org.graphstream.gs-core;bundle-version="1.3.0", org.graphstream.gs-algo;bundle-version="1.3.0", - org.eclipse.lsp4j;bundle-version="0.14.0", - org.eclipse.lsp4j.jsonrpc;bundle-version="0.14.0", + org.eclipse.lsp4j, + org.eclipse.lsp4j.jsonrpc, io.github.classgraph;bundle-version="4.8.35", - com.google.gson;bundle-version="2.8.2", + com.google.gson, org.eclipse.osgi, org.freemarker.freemarker;bundle-version="2.3.30", junit-jupiter-api, diff --git a/org.contextmapper.dsl.ui.tests/.classpath b/org.contextmapper.dsl.ui.tests/.classpath index 540fdbcf..ff0b4448 100644 --- a/org.contextmapper.dsl.ui.tests/.classpath +++ b/org.contextmapper.dsl.ui.tests/.classpath @@ -5,11 +5,6 @@ - - - - - diff --git a/org.contextmapper.dsl.ui.tests/META-INF/MANIFEST.MF b/org.contextmapper.dsl.ui.tests/META-INF/MANIFEST.MF index f6300df4..ef942236 100644 --- a/org.contextmapper.dsl.ui.tests/META-INF/MANIFEST.MF +++ b/org.contextmapper.dsl.ui.tests/META-INF/MANIFEST.MF @@ -14,7 +14,8 @@ Require-Bundle: org.contextmapper.dsl.ui, org.eclipse.xtext.xbase.junit, org.eclipse.core.runtime, org.eclipse.ui.workbench;resolution:=optional, - org.eclipse.xtext.ui.testing + org.eclipse.xtext.ui.testing, + org.eclipse.xtext.xbase.ui.testing Bundle-RequiredExecutionEnvironment: JavaSE-11 Export-Package: org.contextmapper.dsl.ui.tests;x-internal=true, org.contextmapper.tactic.dsl.ui.tests;x-internal=true, diff --git a/org.contextmapper.dsl/pom.xml b/org.contextmapper.dsl/pom.xml index c1a6ec36..eff0c635 100644 --- a/org.contextmapper.dsl/pom.xml +++ b/org.contextmapper.dsl/pom.xml @@ -35,30 +35,10 @@ false - - org.eclipse.emf - org.eclipse.emf.mwe2.launch - ${mwe2Version} - - - org.eclipse.xtext - org.eclipse.xtext.common.types - ${xtextVersion} - - - org.eclipse.xtext - org.eclipse.xtext.xtext.generator - ${xtextVersion} - - - org.eclipse.xtext - org.eclipse.xtext.xbase - ${xtextVersion} - org.eclipse.xtext xtext-antlr-generator - [2.1.1, 3) + 2.1.1 diff --git a/pom.xml b/pom.xml index 72cf4947..75147caf 100644 --- a/pom.xml +++ b/pom.xml @@ -164,19 +164,6 @@ org.eclipse.rcp 0.0.0 - - - eclipse-plugin - org.eclipse.jdt.compiler.apt - 0.0.0 - - - eclipse-plugin - org.eclipse.jdt.compiler.tool - 0.0.0 - @@ -378,6 +365,33 @@ --add-modules=ALL-SYSTEM + + release-composite + + false + + + + + + maven-install-plugin + + + default-install + none + + + + + maven-deploy-plugin + + true + + + + + +