From 1861235c9ae584d854b83d20246f23fc6ea46134 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sun, 11 Aug 2024 00:40:23 +0200 Subject: [PATCH] Specify m2e lifecycle mapping metadata using processing-instructions Using processing-instructions requires much less code and is always defined directly at the targeted execution. Resent versions of all Tycho Plugins contain embedded m2e-lifecycle metadata to disable their execution in the IDE by default. The maven-clean goal is not executed by m2e at all, so does not have to be ignored. --- org.eclipse.xtend.examples/pom.xml | 30 +---- org.eclipse.xtend.ide.tests/pom.xml | 31 +---- org.eclipse.xtend.lib.gwt/pom.xml | 44 +------ org.eclipse.xtend.maven.parent/pom.xml | 107 ----------------- org.eclipse.xtext.maven.parent/pom.xml | 107 ----------------- org.eclipse.xtext.p2repository/pom.xml | 27 +---- .../full/full.parent/full.repository/pom.xml | 36 ------ .../full/full.parent/full/pom.xml | 35 +----- .../full/full.parent/pom.xml | 33 ------ .../lsMavenApp.parent/lsMavenApp.ide/pom.xml | 1 + .../lsMavenApp.parent/lsMavenApp/pom.xml | 36 +----- .../lsMavenApp/lsMavenApp.parent/pom.xml | 33 ------ .../lsMavenFatjar.ide/pom.xml | 1 + .../lsMavenFatjar/pom.xml | 36 +----- .../lsMavenFatjar.parent/pom.xml | 33 ------ .../lsMavenTychoApp/pom.xml | 35 +----- .../lsMavenTychoApp.parent/pom.xml | 33 ------ .../lsMavenTychoFatjar/pom.xml | 35 +----- .../lsMavenTychoFatjar.parent/pom.xml | 33 ------ .../mavenTycho.parent/mavenTycho.web/pom.xml | 1 + .../mavenTycho.parent/mavenTycho/pom.xml | 35 +----- .../mavenTycho/mavenTycho.parent/pom.xml | 33 ------ .../mavenTychoJ17.web/pom.xml | 1 + .../mavenTychoJ17/pom.xml | 35 +----- .../mavenTychoJ17.parent/pom.xml | 33 ------ .../mavenTychoP2.repository/pom.xml | 36 ------ .../mavenTychoP2.web/pom.xml | 1 + .../mavenTychoP2.parent/mavenTychoP2/pom.xml | 35 +----- .../mavenTychoP2/mavenTychoP2.parent/pom.xml | 33 ------ .../mavenTychoP2J17.repository/pom.xml | 36 ------ .../mavenTychoP2J17.web/pom.xml | 1 + .../mavenTychoP2J17/pom.xml | 35 +----- .../mavenTychoP2J17.parent/pom.xml | 33 ------ .../mavenTychoP2J21.repository/pom.xml | 36 ------ .../mavenTychoP2J21.web/pom.xml | 1 + .../mavenTychoP2J21/pom.xml | 35 +----- .../mavenTychoP2J21.parent/pom.xml | 33 ------ .../plainMaven.parent/plainMaven.ide/pom.xml | 1 + .../plainMaven.parent/plainMaven.web/pom.xml | 1 + .../plainMaven.parent/plainMaven/pom.xml | 36 +----- .../plainMaven/plainMaven.parent/pom.xml | 33 ------ .../pom.xml | 1 + .../pom.xml | 1 + org.eclipse.xtext.web.example.jetty/pom.xml | 1 + .../pom.xml | 1 + .../pom.xml | 1 + org.eclipse.xtext.xbase.lib.gwt/pom.xml | 44 +------ .../pom.xml | 63 +--------- .../pom.xml | 39 +------ .../xtext/wizard/IdeProjectDescriptor.xtend | 1 + .../xtext/wizard/P2RepositoryProject.xtend | 50 +------- .../wizard/ParentProjectDescriptor.xtend | 33 ------ .../wizard/RuntimeProjectDescriptor.xtend | 36 +----- .../xtext/wizard/TestProjectDescriptor.xtend | 1 + .../xtext/wizard/WebProjectDescriptor.xtend | 1 + .../xtext/wizard/IdeProjectDescriptor.java | 4 + .../xtext/wizard/P2RepositoryProject.java | 108 ----------------- .../xtext/wizard/ParentProjectDescriptor.java | 99 ---------------- .../wizard/RuntimeProjectDescriptor.java | 109 ++---------------- .../xtext/wizard/TestProjectDescriptor.java | 4 + .../xtext/wizard/WebProjectDescriptor.java | 3 + pom.xml | 1 + 62 files changed, 73 insertions(+), 1778 deletions(-) diff --git a/org.eclipse.xtend.examples/pom.xml b/org.eclipse.xtend.examples/pom.xml index cd92130b9d4..f642364c3de 100644 --- a/org.eclipse.xtend.examples/pom.xml +++ b/org.eclipse.xtend.examples/pom.xml @@ -36,6 +36,7 @@ maven-antrun-plugin + generate-sources @@ -49,34 +50,5 @@ - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-antrun-plugin - [3.1.0,) - - run - - - - - - - - - - - - diff --git a/org.eclipse.xtend.ide.tests/pom.xml b/org.eclipse.xtend.ide.tests/pom.xml index 95b5860a1bc..42028c9a593 100644 --- a/org.eclipse.xtend.ide.tests/pom.xml +++ b/org.eclipse.xtend.ide.tests/pom.xml @@ -22,6 +22,7 @@ 3.5.0 + copy-dependencies process-test-resources @@ -40,35 +41,5 @@ - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [3.3.0,) - - copy-dependencies - - - - - - - - - - - - diff --git a/org.eclipse.xtend.lib.gwt/pom.xml b/org.eclipse.xtend.lib.gwt/pom.xml index 1605429bd04..6e4fbde4e60 100644 --- a/org.eclipse.xtend.lib.gwt/pom.xml +++ b/org.eclipse.xtend.lib.gwt/pom.xml @@ -37,6 +37,7 @@ 2.3 + unpack-xtend-sources generate-resources @@ -65,6 +66,7 @@ maven-antrun-plugin + generate-resources run @@ -98,47 +100,5 @@ ${project.build.directory}/xtend-gwt-sources - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.3,) - - unpack-dependencies - - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - [1.6,) - - run - - - - - - - - - - - - \ No newline at end of file diff --git a/org.eclipse.xtend.maven.parent/pom.xml b/org.eclipse.xtend.maven.parent/pom.xml index 6225edb5ca8..b5d77086700 100644 --- a/org.eclipse.xtend.maven.parent/pom.xml +++ b/org.eclipse.xtend.maven.parent/pom.xml @@ -116,113 +116,6 @@ maven-source-plugin 3.2.1 - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.apache.maven.plugins - - - maven-compiler-plugin - - - [3.0,) - - - compile - testCompile - - - - - - - - - - org.apache.maven.plugins - - - maven-plugin-plugin - - - [2.7,) - - - descriptor - - - - - - - - - - org.codehaus.mojo - - - build-helper-maven-plugin - - - [1.8,) - - - add-source - - - - - - - - - - org.eclipse.tycho - - - tycho-packaging-plugin - - - [0.22.0,) - - - build-qualifier - - - - - - - - - - org.apache.maven.plugins - - - maven-enforcer-plugin - - [3.0,) - - enforce - - - - - - - - - - diff --git a/org.eclipse.xtext.maven.parent/pom.xml b/org.eclipse.xtext.maven.parent/pom.xml index 0b50520cde4..8baf9a8a052 100644 --- a/org.eclipse.xtext.maven.parent/pom.xml +++ b/org.eclipse.xtext.maven.parent/pom.xml @@ -89,113 +89,6 @@ maven-source-plugin 3.2.1 - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.apache.maven.plugins - - - maven-compiler-plugin - - - [3.0,) - - - compile - testCompile - - - - - - - - - - org.apache.maven.plugins - - - maven-plugin-plugin - - - [2.7,) - - - descriptor - - - - - - - - - - org.codehaus.mojo - - - build-helper-maven-plugin - - - [1.8,) - - - add-source - - - - - - - - - - org.eclipse.tycho - - - tycho-packaging-plugin - - - [0.22.0,) - - - build-qualifier - - - - - - - - - - org.apache.maven.plugins - - - maven-enforcer-plugin - - [3.0,) - - enforce - - - - - - - - - - diff --git a/org.eclipse.xtext.p2repository/pom.xml b/org.eclipse.xtext.p2repository/pom.xml index 01f1034132a..1ad11fa8879 100644 --- a/org.eclipse.xtext.p2repository/pom.xml +++ b/org.eclipse.xtext.p2repository/pom.xml @@ -59,7 +59,7 @@ org.codehaus.mojo build-helper-maven-plugin - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-clean-plugin - [3.2.0,) - - clean - - - - - - - - - - diff --git a/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/full.repository/pom.xml b/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/full.repository/pom.xml index 2fd5b88cece..1dec2661270 100644 --- a/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/full.repository/pom.xml +++ b/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/full.repository/pom.xml @@ -9,42 +9,6 @@ full.repository eclipse-repository - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.apache.maven.plugins - - - maven-clean-plugin - - - [2.5,) - - - clean - - - - - - - - - - - - - diff --git a/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/full/pom.xml b/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/full/pom.xml index 1e041cf9891..4c60301095a 100644 --- a/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/full/pom.xml +++ b/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/full/pom.xml @@ -17,6 +17,7 @@ 3.0.0 + mwe2Launcher generate-sources @@ -96,40 +97,6 @@ - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.codehaus.mojo - - - exec-maven-plugin - - - [1.2.1,) - - - java - - - - - - - - - - - - diff --git a/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/pom.xml b/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/pom.xml index f3d66b7e3ee..33e2aa9ff60 100644 --- a/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/pom.xml +++ b/org.eclipse.xtext.tests/testdata/wizard-expectations/full/full.parent/pom.xml @@ -166,39 +166,6 @@ - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.codehaus.mojo - - - build-helper-maven-plugin - - - [1.9.1,) - - - add-resource - add-source - add-test-resource - add-test-source - - - - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.3,) - - unpack-dependencies - - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - [1.6,) - - run - - - - - - - - - - - - \ No newline at end of file diff --git a/org.eclipse.xtext.xtext.ui.examples/projects/domainmodel/org.eclipse.xtext.example.domainmodel.releng/pom.xml b/org.eclipse.xtext.xtext.ui.examples/projects/domainmodel/org.eclipse.xtext.example.domainmodel.releng/pom.xml index 76fc74ee498..cab549c7296 100644 --- a/org.eclipse.xtext.xtext.ui.examples/projects/domainmodel/org.eclipse.xtext.example.domainmodel.releng/pom.xml +++ b/org.eclipse.xtext.xtext.ui.examples/projects/domainmodel/org.eclipse.xtext.example.domainmodel.releng/pom.xml @@ -18,8 +18,8 @@ UTF-8 - 11 11 @@ -174,60 +174,7 @@ 3.3.0 - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.apache.maven.plugins - - - maven-resources-plugin - - - [2.4.3,) - - - resources - testResources - - - - - - - - - - org.codehaus.mojo - - - build-helper-maven-plugin - - - [1.9.1,) - - - add-resource - add-source - add-test-resource - add-test-source - - - - - - - - - - - - @@ -263,7 +210,7 @@ false - ossrh-snapshots @@ -276,7 +223,7 @@ http://oss.sonatype.org/content/repositories/snapshots - sonatype-nexus-snapshots diff --git a/org.eclipse.xtext.xtext.ui.examples/projects/domainmodel/org.eclipse.xtext.example.domainmodel/pom.xml b/org.eclipse.xtext.xtext.ui.examples/projects/domainmodel/org.eclipse.xtext.example.domainmodel/pom.xml index ce1c051c8c4..7b5a4f1dd89 100644 --- a/org.eclipse.xtext.xtext.ui.examples/projects/domainmodel/org.eclipse.xtext.example.domainmodel/pom.xml +++ b/org.eclipse.xtext.xtext.ui.examples/projects/domainmodel/org.eclipse.xtext.example.domainmodel/pom.xml @@ -9,7 +9,7 @@ org.eclipse.xtext.example.domainmodel eclipse-plugin - + 2.19.0 @@ -22,6 +22,7 @@ 3.0.0 + mwe2Launcher generate-sources @@ -52,7 +53,7 @@ org.eclipse.xtend xtend-maven-plugin - + org.apache.maven.plugins maven-clean-plugin @@ -95,40 +96,6 @@ - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.codehaus.mojo - - - exec-maven-plugin - - - [1.2.1,) - - - java - - - - - - - - - - - - diff --git a/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/IdeProjectDescriptor.xtend b/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/IdeProjectDescriptor.xtend index 4b8a7dc0499..efc93528ba1 100644 --- a/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/IdeProjectDescriptor.xtend +++ b/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/IdeProjectDescriptor.xtend @@ -87,6 +87,7 @@ class IdeProjectDescriptor extends ProjectDescriptor { 3.3.0 + add-source initialize diff --git a/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/P2RepositoryProject.xtend b/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/P2RepositoryProject.xtend index 84cba320f2b..b6378f8501d 100644 --- a/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/P2RepositoryProject.xtend +++ b/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/P2RepositoryProject.xtend @@ -19,30 +19,30 @@ class P2RepositoryProject extends ProjectDescriptor { override getNameQualifier() { ".repository" } - + override isEclipsePluginProject() { false } - + override isPartOfGradleBuild() { false } - + override isPartOfMavenBuild() { true } - + override isEnabled() { super.enabled && config.runtimeProject.isEclipsePluginProject } - + override getFiles() { val files = newArrayList files += super.files files += file(Outlet.ROOT, "category.xml", categoryXml) files } - + override getSourceFolders() { #{} } @@ -68,44 +68,6 @@ class P2RepositoryProject extends ProjectDescriptor { override pom() { super.pom => [ packaging = "eclipse-repository" - buildSection = ''' - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.apache.maven.plugins - - - maven-clean-plugin - - - [2.5,) - - - clean - - - - - - - - - - - - - - ''' ] } diff --git a/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/ParentProjectDescriptor.xtend b/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/ParentProjectDescriptor.xtend index b6b217bb540..6c188f90dd2 100644 --- a/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/ParentProjectDescriptor.xtend +++ b/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/ParentProjectDescriptor.xtend @@ -388,39 +388,6 @@ class ParentProjectDescriptor extends ProjectDescriptor { 3.0.0 «ENDIF» - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.codehaus.mojo - - - build-helper-maven-plugin - - - [1.9.1,) - - - add-resource - add-source - add-test-resource - add-test-source - - - - - - - - - - «IF config.needsTychoBuild»