From f43f03f4fd6e114f0063fc440bc2304feabefe65 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sat, 2 Jul 2022 15:00:35 +0200 Subject: [PATCH] Embed m2e lifecycle-mapping-metadata in Tycho plug-ins The embedded metadata simply advice M2E to ignore executions of each Tycho Mojo. In the Eclipse IDE Plug-in development support is PDE's duty and therefore Tycho Plug-ins have nothing to do. Because the metadata embedded in a plugin are considered with lowest priority, a user can simply overrule this decision, if it is desired to execute a Tycho Plugin within the IDE. Fixes https://github.com/eclipse/tycho/issues/945 Backport of commit f3bc5084e319a4dd119e67a9af66f58dd8bb5c6e, added via PR https://github.com/eclipse/tycho/pull/1105 --- RELEASE_NOTES.md | 7 ++++++ .../m2e/lifecycle-mapping-metadata.xml | 16 +++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 17 ++++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 15 ++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 15 ++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 15 ++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 15 ++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 15 ++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 15 ++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 17 ++++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 16 +++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 15 ++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 16 +++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 20 ++++++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 19 +++++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 20 ++++++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 23 +++++++++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 17 ++++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 17 ++++++++++++++ .../m2e/lifecycle-mapping-metadata.xml | 16 +++++++++++++ 20 files changed, 326 insertions(+) create mode 100644 target-platform-configuration/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-compiler-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-ds-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-extras/target-platform-validation-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-extras/tycho-custom-bundle-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-extras/tycho-dependency-tools-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-extras/tycho-document-bundle-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-extras/tycho-eclipserun-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-extras/tycho-p2-extras-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-extras/tycho-version-bump-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-gpg-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-p2/tycho-p2-director-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-p2/tycho-p2-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-p2/tycho-p2-publisher-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-p2/tycho-p2-repository-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-packaging-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-release/tycho-versions-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-source-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml create mode 100644 tycho-surefire/tycho-surefire-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 68a35164be..6c6b57d004 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -3,6 +3,7 @@ This page describes the noteworthy improvements provided by each release of Eclipse Tycho. ## 2.7.4 + Fixes: - Tycho reports wrong type in case of maven GAV restored from UI - Support bnd processing in pomless builds @@ -14,6 +15,12 @@ Fixes: - Fix Mojo Configuration of DS Plugin is ignored - Check that components declared in the manifest exits +### Eclipse M2E lifecycle-mapping metadata embedded + +All Tycho plugins are now shipped with embedded M2E lifecycle-mapping-metadata files. +Therefore M2E now knows by default how to handle them and it is not necessary anymore to install any connector (usually `org.sonatype.tycho.m2e` was used) for them. + + ## 2.7.3 Fixes: - p2-maven-site includes bundles in the repository #932 diff --git a/target-platform-configuration/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/target-platform-configuration/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..e59f2e7c5d --- /dev/null +++ b/target-platform-configuration/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,16 @@ + + + + + + + target-platform + target-platform-configuration + + + + + + + + diff --git a/tycho-compiler-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-compiler-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..d661f345ef --- /dev/null +++ b/tycho-compiler-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,17 @@ + + + + + + + validate-classpath + testCompile + compile + + + + + + + + diff --git a/tycho-ds-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-ds-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..0bbaff7eb1 --- /dev/null +++ b/tycho-ds-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,15 @@ + + + + + + + declarative-services + + + + + + + + diff --git a/tycho-extras/target-platform-validation-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-extras/target-platform-validation-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..90f8662388 --- /dev/null +++ b/tycho-extras/target-platform-validation-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,15 @@ + + + + + + + validate-target-platform + + + + + + + + diff --git a/tycho-extras/tycho-custom-bundle-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-extras/tycho-custom-bundle-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..8b9ff911e0 --- /dev/null +++ b/tycho-extras/tycho-custom-bundle-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,15 @@ + + + + + + + custom-bundle + + + + + + + + diff --git a/tycho-extras/tycho-dependency-tools-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-extras/tycho-dependency-tools-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..3ee32a181a --- /dev/null +++ b/tycho-extras/tycho-dependency-tools-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,15 @@ + + + + + + + list-dependencies + + + + + + + + diff --git a/tycho-extras/tycho-document-bundle-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-extras/tycho-document-bundle-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..772164f689 --- /dev/null +++ b/tycho-extras/tycho-document-bundle-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,15 @@ + + + + + + + javadoc + + + + + + + + diff --git a/tycho-extras/tycho-eclipserun-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-extras/tycho-eclipserun-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..edf9e87afb --- /dev/null +++ b/tycho-extras/tycho-eclipserun-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,15 @@ + + + + + + + eclipse-run + + + + + + + + diff --git a/tycho-extras/tycho-p2-extras-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-extras/tycho-p2-extras-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..bc75f76d1b --- /dev/null +++ b/tycho-extras/tycho-p2-extras-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,17 @@ + + + + + + + mirror + publish-features-and-bundles + compare-version-with-baselines + + + + + + + + diff --git a/tycho-extras/tycho-version-bump-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-extras/tycho-version-bump-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..63568c84e3 --- /dev/null +++ b/tycho-extras/tycho-version-bump-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,16 @@ + + + + + + + update-target + update-product + + + + + + + + diff --git a/tycho-gpg-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-gpg-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..21b2e8cb90 --- /dev/null +++ b/tycho-gpg-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,15 @@ + + + + + + + sign-p2-artifacts + + + + + + + + diff --git a/tycho-p2/tycho-p2-director-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-p2/tycho-p2-director-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..8ebd8febf6 --- /dev/null +++ b/tycho-p2/tycho-p2-director-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,16 @@ + + + + + + + archive-products + materialize-products + + + + + + + + diff --git a/tycho-p2/tycho-p2-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-p2/tycho-p2-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..e23a5c6438 --- /dev/null +++ b/tycho-p2/tycho-p2-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,20 @@ + + + + + + + update-site-p2-metadata + p2-metadata + category-p2-metadata + update-local-index + feature-p2-metadata + p2-metadata-default + + + + + + + + diff --git a/tycho-p2/tycho-p2-publisher-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-p2/tycho-p2-publisher-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..3c065631c9 --- /dev/null +++ b/tycho-p2/tycho-p2-publisher-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,19 @@ + + + + + + + attach-artifacts + publish-ee-profile + publish-osgi-ee + publish-products + publish-categories + + + + + + + + diff --git a/tycho-p2/tycho-p2-repository-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-p2/tycho-p2-repository-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..799a5bbc27 --- /dev/null +++ b/tycho-p2/tycho-p2-repository-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,20 @@ + + + + + + + archive-repository + assemble-maven-repository + fix-artifacts-metadata + verify-repository + remap-artifacts-to-m2-repo + assemble-repository + + + + + + + + diff --git a/tycho-packaging-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-packaging-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..6505054e55 --- /dev/null +++ b/tycho-packaging-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,23 @@ + + + + + + + build-qualifier-aggregator + package-plugin + package-feature + validate-version + build-qualifier + validate-id + package-iu + update-consumer-pom + package-target-definition + + + + + + + + diff --git a/tycho-release/tycho-versions-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-release/tycho-versions-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..0d4c5b9f76 --- /dev/null +++ b/tycho-release/tycho-versions-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,17 @@ + + + + + + + update-pom + update-eclipse-metadata + set-version + + + + + + + + diff --git a/tycho-source-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-source-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..3e608e1c2b --- /dev/null +++ b/tycho-source-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,17 @@ + + + + + + + plugin-source + feature-source + generate-pde-source-header + + + + + + + + diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/tycho-surefire/tycho-surefire-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 0000000000..fecbb20107 --- /dev/null +++ b/tycho-surefire/tycho-surefire-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,16 @@ + + + + + + + integration-test + test + + + + + + + +