From 576de41d512691e18990a41239fa25c56139fc2f Mon Sep 17 00:00:00 2001 From: Mehmet Emin Karaman Date: Tue, 26 Nov 2024 12:40:01 +0100 Subject: [PATCH 01/14] Bugfix for Hover which is visible above other application windows. #2534 This patch is fixing the problem, where the HoverManagers listeners are deregistered but the hover is still visibile on top. This happens when the hover was sticky eclipse was minimized and put back on foreground after it. In that case the listeners are already deregistered and there is no chance to react at all. So for this case the visibility has to be set explicitly when the close is going to stop. --- .../xtext/xbase/ui/hover/XbaseInformationControl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.eclipse.xtext.xbase.ui/src/org/eclipse/xtext/xbase/ui/hover/XbaseInformationControl.java b/org.eclipse.xtext.xbase.ui/src/org/eclipse/xtext/xbase/ui/hover/XbaseInformationControl.java index 980972f764a..d8cdd82205d 100644 --- a/org.eclipse.xtext.xbase.ui/src/org/eclipse/xtext/xbase/ui/hover/XbaseInformationControl.java +++ b/org.eclipse.xtext.xbase.ui/src/org/eclipse/xtext/xbase/ui/hover/XbaseInformationControl.java @@ -514,8 +514,6 @@ public static boolean isAvailable(Composite parent) { @Override public void setVisible(boolean visible) { Shell shell = getShell(); - if (shell.isVisible() == visible) - return; if (!visible) { super.setVisible(false); @@ -523,6 +521,9 @@ public void setVisible(boolean visible) { startDisposeTimeout(shell.getDisplay()); return; } + + if (shell.isVisible() == visible) + return; /* * The Browser widget flickers when made visible while it is not completely loaded. From c2a705810d93c71e43a629a91d66c1ba36cbeeff Mon Sep 17 00:00:00 2001 From: Mehmet Emin Karaman Date: Mon, 2 Dec 2024 13:45:42 +0100 Subject: [PATCH 02/14] Testfailure fix for MacOS and cleanup --- .../editor/DirtyStateEditorSupportIntegrationTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org.eclipse.xtext.ui.tests/src-longrunning/org/eclipse/xtext/ui/tests/editor/DirtyStateEditorSupportIntegrationTest.java b/org.eclipse.xtext.ui.tests/src-longrunning/org/eclipse/xtext/ui/tests/editor/DirtyStateEditorSupportIntegrationTest.java index a0cbb6890ef..271e8bc89f6 100644 --- a/org.eclipse.xtext.ui.tests/src-longrunning/org/eclipse/xtext/ui/tests/editor/DirtyStateEditorSupportIntegrationTest.java +++ b/org.eclipse.xtext.ui.tests/src-longrunning/org/eclipse/xtext/ui/tests/editor/DirtyStateEditorSupportIntegrationTest.java @@ -134,7 +134,7 @@ public void testUndoRedo() throws Exception { Display.getDefault().readAndDispatch(); - assertNotEquals(document.get(), ""); + assertNotEquals("", document.get()); assertTrue(editor.getDocumentProvider() instanceof FileDocumentProvider); FileDocumentProvider fileDocumentProvider = (FileDocumentProvider)editor.getDocumentProvider(); @@ -152,7 +152,10 @@ public void testUndoRedo() throws Exception { Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_REFRESH, null); syncUtil.yieldToQueuedDisplayJobs(new NullProgressMonitor()); - assertEquals(document.get(), ""); + // This was added to avoid flakyness for testing on mac os + syncUtil.waitForReconciler(editor); + + assertEquals("", document.get()); } /** From f5fdfe0a8192581b19275c260f9f007a7ca2952d Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Mon, 2 Dec 2024 19:55:32 +0100 Subject: [PATCH 03/14] switch to 4.35 I-Builds Signed-off-by: Christian Dietrich --- Jenkinsfile | 2 +- xtext-latest.target | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 09a85bcc982..2103caff632 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -152,7 +152,7 @@ def isTriggeredByUpstream() { def eclipseVersion() { def targetPlatform = selectedTargetPlatform() if (targetPlatform == 'latest') { - return "4.34" + return "4.35" } else { def baseDate = java.time.LocalDate.parse("2018-06-01") // 4.8 Photon def df = java.time.format.DateTimeFormatter.ofPattern("yyyyMMdd") diff --git a/xtext-latest.target b/xtext-latest.target index f6609257987..ee201deffdb 100644 --- a/xtext-latest.target +++ b/xtext-latest.target @@ -26,7 +26,7 @@ - + From 161fadfbb4dfe3412ec765d8d0daa63acf6db2a0 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 27 Nov 2024 08:07:15 +0100 Subject: [PATCH 04/14] use source Java record in xtend.core.tests --- .../META-INF/MANIFEST.MF | 3 +-- .../tests/validation/OverrideValidationTest.java | 13 ++----------- .../testdata/test/SomeRecord.java | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 org.eclipse.xtend.core.tests/testdata/test/SomeRecord.java diff --git a/org.eclipse.xtend.core.tests/META-INF/MANIFEST.MF b/org.eclipse.xtend.core.tests/META-INF/MANIFEST.MF index 897da505875..6d8701fc553 100644 --- a/org.eclipse.xtend.core.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.xtend.core.tests/META-INF/MANIFEST.MF @@ -22,8 +22,7 @@ Require-Bundle: org.eclipse.xtend.core;bundle-version="2.38.0", org.objectweb.asm;bundle-version="[9.7.1,9.8.0)", org.eclipse.jdt.core;bundle-version="3.37.0", org.eclipse.xtext.builder.standalone;bundle-version="2.38.0", - org.eclipse.xtext.java;bundle-version="2.38.0", - org.eclipse.draw2d + org.eclipse.xtext.java;bundle-version="2.38.0" Import-Package: jakarta.inject;version="2.0.1", org.apache.log4j;version="1.2.24", org.apache.log4j.spi;version="1.2.24", diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/validation/OverrideValidationTest.java b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/validation/OverrideValidationTest.java index 346eb690bda..4917d42a962 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/validation/OverrideValidationTest.java +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/validation/OverrideValidationTest.java @@ -18,9 +18,7 @@ import org.eclipse.xtend.core.xtend.XtendClass; import org.eclipse.xtend.core.xtend.XtendInterface; import org.eclipse.xtext.testing.validation.ValidationTestHelper; -import org.eclipse.xtext.util.JavaRuntimeVersion; import org.eclipse.xtext.xbase.XbasePackage; -import org.junit.Assume; import org.junit.Test; import com.google.inject.Inject; @@ -1068,18 +1066,11 @@ public void testClassMustBeAbstract_06() throws Exception { helper.assertNoWarnings(xtendClass, XTEND_FUNCTION, MISSING_SYNCHRONIZED); } - /** - * Since there's no record in the JDK and adding a Java source with a record in this - * project would require Java 21 compilation level, I'm using a known record from - * draw2d, which is in our target platform. - */ @Test public void testOverrideJavaRecord() throws Exception { - Assume.assumeTrue("Active only on Java 21 and later", JavaRuntimeVersion.isJava21OrLater()); - var javaRecord = "org.eclipse.draw2d.geometry.Interval"; - var source = "class Foo extends " + javaRecord + " { }"; + var source = "class Foo extends test.SomeRecord { }"; XtendClass xtendClass = clazz(source); helper.assertError(xtendClass, XTEND_CLASS, OVERRIDDEN_FINAL, - source.indexOf(javaRecord), javaRecord.length(), + source.indexOf("test.SomeRecord"), "test.SomeRecord".length(), "override", "final"); } diff --git a/org.eclipse.xtend.core.tests/testdata/test/SomeRecord.java b/org.eclipse.xtend.core.tests/testdata/test/SomeRecord.java new file mode 100644 index 00000000000..9fd25392255 --- /dev/null +++ b/org.eclipse.xtend.core.tests/testdata/test/SomeRecord.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * Copyright (c) 2024 Lorenzo Bettini 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. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package test; + +/** + * @author Lorenzo Bettini - Initial contribution and API + */ +public record SomeRecord() { + +} From c8f74b2148073d222ca3a6338951f8f83ad7d229 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 27 Nov 2024 08:11:12 +0100 Subject: [PATCH 05/14] use source Java record in xbase.tests --- .../META-INF/MANIFEST.MF | 3 +-- .../tests/compiler/Java21RecordCompilerTest.java | 14 +++----------- .../testdata/test/RecordWithFields.java | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 org.eclipse.xtext.xbase.tests/testdata/test/RecordWithFields.java diff --git a/org.eclipse.xtext.xbase.tests/META-INF/MANIFEST.MF b/org.eclipse.xtext.xbase.tests/META-INF/MANIFEST.MF index 2074a3617f8..842f34f2931 100644 --- a/org.eclipse.xtext.xbase.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.xtext.xbase.tests/META-INF/MANIFEST.MF @@ -16,8 +16,7 @@ Require-Bundle: org.eclipse.xtext.xbase;bundle-version="2.38.0", org.eclipse.core.runtime;bundle-version="3.31.0", org.eclipse.xtext.xbase.testdata;bundle-version="2.38.0", org.eclipse.xtext.xbase.ide;bundle-version="2.38.0", - org.junit;bundle-version="4.13.2", - org.eclipse.draw2d + org.junit;bundle-version="4.13.2" Bundle-Vendor: Eclipse Xtext Export-Package: org.eclipse.xtext.xbase.tests;version="2.38.0", org.eclipse.xtext.xbase.tests.interpreter;version="2.38.0" diff --git a/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/Java21RecordCompilerTest.java b/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/Java21RecordCompilerTest.java index 7337c5a4869..f9963938f6b 100644 --- a/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/Java21RecordCompilerTest.java +++ b/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/Java21RecordCompilerTest.java @@ -9,11 +9,9 @@ package org.eclipse.xtext.xbase.tests.compiler; import org.eclipse.xtext.testing.TemporaryFolder; -import org.eclipse.xtext.util.JavaRuntimeVersion; import org.eclipse.xtext.util.Strings; import org.eclipse.xtext.xbase.testing.CompilationTestHelper; import org.eclipse.xtext.xbase.tests.jvmmodel.AbstractJvmModelTest; -import org.junit.Assume; import org.junit.Rule; import org.junit.Test; @@ -30,30 +28,24 @@ public class Java21RecordCompilerTest extends AbstractJvmModelTest { @Inject private CompilationTestHelper compilationTestHelper; - /** - * Since there's no record in the JDK and adding a Java source with a record in this - * project would require Java 21 compilation level, I'm using a known record from - * draw2d, which is in our target platform. - */ @Test public void testUseJavaRecord() throws Exception { - Assume.assumeTrue("Active only on Java 21 and later", JavaRuntimeVersion.isJava21OrLater()); String source = "{\n" - + " var interval = new org.eclipse.draw2d.geometry.Interval(0, 10);\n" + + " var interval = new test.RecordWithFields(0, 10);\n" + " var int begin = interval.begin\n" + " var end = interval.end()\n" + " interval.toString" + "}"; compilationTestHelper.compile(source, it -> { String expectation = - "import org.eclipse.draw2d.geometry.Interval;\n" + "import test.RecordWithFields;\n" + "\n" + "@SuppressWarnings(\"all\")\n" + "public class Test {\n" + " public String doStuff(final String s) {\n" + " String _xblockexpression = null;\n" + " {\n" - + " Interval interval = new Interval(0, 10);\n" + + " RecordWithFields interval = new RecordWithFields(0, 10);\n" + " int begin = interval.begin();\n" + " int end = interval.end();\n" + " _xblockexpression = interval.toString();\n" diff --git a/org.eclipse.xtext.xbase.tests/testdata/test/RecordWithFields.java b/org.eclipse.xtext.xbase.tests/testdata/test/RecordWithFields.java new file mode 100644 index 00000000000..60d2f16a422 --- /dev/null +++ b/org.eclipse.xtext.xbase.tests/testdata/test/RecordWithFields.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * Copyright (c) 2024 Lorenzo Bettini 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. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package test; + +/** + * @author Lorenzo Bettini - Initial contribution and API + */ +public record RecordWithFields(int begin, int end) { + +} From 269ee8474022beda94f335fa82b39eb3e63c792f Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 27 Nov 2024 08:14:08 +0100 Subject: [PATCH 06/14] enabled other tests --- .../IncrementalStandaloneBuilderWithJava21Test.java | 5 +---- .../org/eclipse/xtext/java/tests/JavaSourceLanguageTest.java | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/org.eclipse.xtext.builder.standalone.tests/src/org/eclipse/xtext/builder/standalone/incremental/IncrementalStandaloneBuilderWithJava21Test.java b/org.eclipse.xtext.builder.standalone.tests/src/org/eclipse/xtext/builder/standalone/incremental/IncrementalStandaloneBuilderWithJava21Test.java index aa8ebf794a2..6f146c347d9 100644 --- a/org.eclipse.xtext.builder.standalone.tests/src/org/eclipse/xtext/builder/standalone/incremental/IncrementalStandaloneBuilderWithJava21Test.java +++ b/org.eclipse.xtext.builder.standalone.tests/src/org/eclipse/xtext/builder/standalone/incremental/IncrementalStandaloneBuilderWithJava21Test.java @@ -13,9 +13,7 @@ import java.io.File; -import org.eclipse.xtext.util.JavaRuntimeVersion; import org.eclipse.xtext.util.JavaVersion; -import org.junit.Assume; import org.junit.Before; import org.junit.Test; @@ -36,8 +34,7 @@ public void setUp() { } @Test - public void testCleanBuildAccessingJava21Record() { - Assume.assumeTrue("Active only on Java 21 and later", JavaRuntimeVersion.isJava21OrLater()); + public void testCleanBuildAccessingJavaRecord() { initBuilder(new ContentAssistFragmentTestLangConfiguration()); assertTrue(testBuilder.launch()); diff --git a/org.eclipse.xtext.java.tests/src/org/eclipse/xtext/java/tests/JavaSourceLanguageTest.java b/org.eclipse.xtext.java.tests/src/org/eclipse/xtext/java/tests/JavaSourceLanguageTest.java index 3df5bf1b39e..520f40345f9 100644 --- a/org.eclipse.xtext.java.tests/src/org/eclipse/xtext/java/tests/JavaSourceLanguageTest.java +++ b/org.eclipse.xtext.java.tests/src/org/eclipse/xtext/java/tests/JavaSourceLanguageTest.java @@ -37,12 +37,10 @@ import org.eclipse.xtext.testing.InjectWith; import org.eclipse.xtext.testing.XtextRunner; import org.eclipse.xtext.testing.util.InMemoryURIHandler; -import org.eclipse.xtext.util.JavaRuntimeVersion; import org.eclipse.xtext.util.JavaVersion; import org.eclipse.xtext.xbase.lib.Exceptions; import org.eclipse.xtext.xbase.lib.IterableExtensions; import org.junit.Assert; -import org.junit.Assume; import org.junit.Test; import org.junit.runner.RunWith; @@ -186,8 +184,7 @@ public void testClassShadowing() { } @Test - public void testJava21Record() { - Assume.assumeTrue("Active only on Java 21 and later", JavaRuntimeVersion.isJava21OrLater()); + public void testJavaRecord() { ImmutableMap files = ImmutableMap.builder() .put("example/MyRecord.java", "package example;\n" From aeb4cfd6437e429ad7c909159da28d0298b84aac Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 27 Nov 2024 10:21:22 +0100 Subject: [PATCH 07/14] plugins ITs: Java records are also in standard test projects --- .../it/compile/simple/src/main/java/test/JavaRecord.java | 7 +++++++ .../it/compile/simple/src/main/java/test/XtendA.xtend | 9 ++++++--- .../org/eclipse/xtext/maven/plugin/XtextGeneratorIT.java | 1 + .../it/generate/java-lang-bi-ref/src/JavaRecord.java | 5 +++++ .../generate/java-lang-bi-ref/src/XbaseReferToJava.xbase | 2 ++ 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 org.eclipse.xtend.maven.plugin/src/test/resources/it/compile/simple/src/main/java/test/JavaRecord.java create mode 100644 org.eclipse.xtext.maven.plugin/src/test/resources/it/generate/java-lang-bi-ref/src/JavaRecord.java diff --git a/org.eclipse.xtend.maven.plugin/src/test/resources/it/compile/simple/src/main/java/test/JavaRecord.java b/org.eclipse.xtend.maven.plugin/src/test/resources/it/compile/simple/src/main/java/test/JavaRecord.java new file mode 100644 index 00000000000..1792c04fbf4 --- /dev/null +++ b/org.eclipse.xtend.maven.plugin/src/test/resources/it/compile/simple/src/main/java/test/JavaRecord.java @@ -0,0 +1,7 @@ +package test; + +public record JavaRecord(String name) { + public XtendA foo(XtendA test) { + return test; + } +} diff --git a/org.eclipse.xtend.maven.plugin/src/test/resources/it/compile/simple/src/main/java/test/XtendA.xtend b/org.eclipse.xtend.maven.plugin/src/test/resources/it/compile/simple/src/main/java/test/XtendA.xtend index 99a317b545f..e9e7af7244d 100644 --- a/org.eclipse.xtend.maven.plugin/src/test/resources/it/compile/simple/src/main/java/test/XtendA.xtend +++ b/org.eclipse.xtend.maven.plugin/src/test/resources/it/compile/simple/src/main/java/test/XtendA.xtend @@ -1,13 +1,16 @@ package test class XtendA extends JavaB { - + def JavaB test2(XtendC s) { return s.foo.newJavaB } - + def JavaB newJavaB() { return new JavaB() } - + + def JavaRecord newJavaRecord() { + return new JavaRecord("a test") + } } \ No newline at end of file diff --git a/org.eclipse.xtext.maven.plugin/src/test/java/org/eclipse/xtext/maven/plugin/XtextGeneratorIT.java b/org.eclipse.xtext.maven.plugin/src/test/java/org/eclipse/xtext/maven/plugin/XtextGeneratorIT.java index 17d7d9405b0..7276e0a7c4d 100644 --- a/org.eclipse.xtext.maven.plugin/src/test/java/org/eclipse/xtext/maven/plugin/XtextGeneratorIT.java +++ b/org.eclipse.xtext.maven.plugin/src/test/java/org/eclipse/xtext/maven/plugin/XtextGeneratorIT.java @@ -237,6 +237,7 @@ public void javaLangBiRef() throws Exception { verifier.verifyFilePresent(verifier.getBasedir() + "/src-gen/XbaseReferToJava.java"); verifier.verifyFilePresent(verifier.getBasedir() + "/target/xtext-temp/stub-classes/XbaseReferToJava.class"); verifier.verifyFilePresent(verifier.getBasedir() + "/target/xtext-temp/stub-classes/JavaClazz.class"); + verifier.verifyFilePresent(verifier.getBasedir() + "/target/xtext-temp/stub-classes/JavaRecord.class"); } @Test diff --git a/org.eclipse.xtext.maven.plugin/src/test/resources/it/generate/java-lang-bi-ref/src/JavaRecord.java b/org.eclipse.xtext.maven.plugin/src/test/resources/it/generate/java-lang-bi-ref/src/JavaRecord.java new file mode 100644 index 00000000000..044b51be9e9 --- /dev/null +++ b/org.eclipse.xtext.maven.plugin/src/test/resources/it/generate/java-lang-bi-ref/src/JavaRecord.java @@ -0,0 +1,5 @@ +public record JavaRecord(String name) { + public void useXbaseType(XbaseReferToJava xbaseType) throws Throwable { + xbaseType.myMethod(); + } +} diff --git a/org.eclipse.xtext.maven.plugin/src/test/resources/it/generate/java-lang-bi-ref/src/XbaseReferToJava.xbase b/org.eclipse.xtext.maven.plugin/src/test/resources/it/generate/java-lang-bi-ref/src/XbaseReferToJava.xbase index 23d98f7cfb6..b35c73b9212 100644 --- a/org.eclipse.xtext.maven.plugin/src/test/resources/it/generate/java-lang-bi-ref/src/XbaseReferToJava.xbase +++ b/org.eclipse.xtext.maven.plugin/src/test/resources/it/generate/java-lang-bi-ref/src/XbaseReferToJava.xbase @@ -1,2 +1,4 @@ val JavaClazz jc = null +val JavaRecord jr = new JavaRecord("test") +val name = jr.name() jc.useXbaseType(this) From 06bfc069e0f1d39bdf10a315841d51578b0836d6 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 4 Dec 2024 10:28:01 +0100 Subject: [PATCH 08/14] maven-war-plugin 3.4.0 --- .../mavenTycho/mavenTycho.parent/mavenTycho.web/pom.xml | 2 +- .../mavenTychoJUnit5.parent/mavenTychoJUnit5.web/pom.xml | 2 +- .../mavenTychoP2/mavenTychoP2.parent/mavenTychoP2.web/pom.xml | 2 +- .../mavenTychoP2J21.parent/mavenTychoP2J21.web/pom.xml | 2 +- .../plainMaven/plainMaven.parent/plainMaven.web/pom.xml | 2 +- org.eclipse.xtext.web.example.jetty/pom.xml | 2 +- .../org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.xtend | 2 +- .../org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTycho/mavenTycho.parent/mavenTycho.web/pom.xml b/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTycho/mavenTycho.parent/mavenTycho.web/pom.xml index 28874d64676..5ed877890f6 100644 --- a/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTycho/mavenTycho.parent/mavenTycho.web/pom.xml +++ b/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTycho/mavenTycho.parent/mavenTycho.web/pom.xml @@ -27,7 +27,7 @@ maven-war-plugin - 3.3.2 + 3.4.0 WebRoot false diff --git a/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoJUnit5/mavenTychoJUnit5.parent/mavenTychoJUnit5.web/pom.xml b/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoJUnit5/mavenTychoJUnit5.parent/mavenTychoJUnit5.web/pom.xml index 294ff03aa8f..bbc61ffb453 100644 --- a/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoJUnit5/mavenTychoJUnit5.parent/mavenTychoJUnit5.web/pom.xml +++ b/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoJUnit5/mavenTychoJUnit5.parent/mavenTychoJUnit5.web/pom.xml @@ -27,7 +27,7 @@ maven-war-plugin - 3.3.2 + 3.4.0 WebRoot false diff --git a/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoP2/mavenTychoP2.parent/mavenTychoP2.web/pom.xml b/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoP2/mavenTychoP2.parent/mavenTychoP2.web/pom.xml index 0758b028844..9daacd2a859 100644 --- a/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoP2/mavenTychoP2.parent/mavenTychoP2.web/pom.xml +++ b/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoP2/mavenTychoP2.parent/mavenTychoP2.web/pom.xml @@ -27,7 +27,7 @@ maven-war-plugin - 3.3.2 + 3.4.0 WebRoot false diff --git a/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoP2J21/mavenTychoP2J21.parent/mavenTychoP2J21.web/pom.xml b/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoP2J21/mavenTychoP2J21.parent/mavenTychoP2J21.web/pom.xml index bb0100bbc49..4eba33b516b 100644 --- a/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoP2J21/mavenTychoP2J21.parent/mavenTychoP2J21.web/pom.xml +++ b/org.eclipse.xtext.tests/testdata/wizard-expectations/mavenTychoP2J21/mavenTychoP2J21.parent/mavenTychoP2J21.web/pom.xml @@ -27,7 +27,7 @@ maven-war-plugin - 3.3.2 + 3.4.0 WebRoot false diff --git a/org.eclipse.xtext.tests/testdata/wizard-expectations/plainMaven/plainMaven.parent/plainMaven.web/pom.xml b/org.eclipse.xtext.tests/testdata/wizard-expectations/plainMaven/plainMaven.parent/plainMaven.web/pom.xml index 04c83ed9b83..4725de7ec51 100644 --- a/org.eclipse.xtext.tests/testdata/wizard-expectations/plainMaven/plainMaven.parent/plainMaven.web/pom.xml +++ b/org.eclipse.xtext.tests/testdata/wizard-expectations/plainMaven/plainMaven.parent/plainMaven.web/pom.xml @@ -17,7 +17,7 @@ maven-war-plugin - 3.3.2 + 3.4.0 src/main/webapp false diff --git a/org.eclipse.xtext.web.example.jetty/pom.xml b/org.eclipse.xtext.web.example.jetty/pom.xml index 4253448916f..da177765996 100644 --- a/org.eclipse.xtext.web.example.jetty/pom.xml +++ b/org.eclipse.xtext.web.example.jetty/pom.xml @@ -88,7 +88,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.codehaus.mojo diff --git a/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.xtend b/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.xtend index 215e10ff2c9..0569eea99fc 100644 --- a/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.xtend +++ b/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.xtend @@ -102,7 +102,7 @@ class WebProjectDescriptor extends ProjectDescriptor { maven-war-plugin - 3.3.2 + 3.4.0 �Outlet.WEBAPP.sourceFolder� false diff --git a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.java b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.java index ca8862ada2f..f17a14c7f17 100644 --- a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.java +++ b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.java @@ -215,7 +215,7 @@ public PomFile pom() { _builder.append("maven-war-plugin"); _builder.newLine(); _builder.append("\t\t\t"); - _builder.append("3.3.2"); + _builder.append("3.4.0"); _builder.newLine(); _builder.append("\t\t\t"); _builder.append(""); From 1b2f12f3bafbe9c2ac82bf75242105ad87bb3e25 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 4 Dec 2024 14:25:22 +0100 Subject: [PATCH 09/14] re-enabled integration tests for xtend-archetype --- full-build.sh | 3 +-- org.eclipse.xtend.maven.archetype/pom.xml | 11 +++++++---- .../resources/META-INF/maven/archetype-metadata.xml | 2 +- .../resources/projects/first/archetype.properties | 1 + 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/full-build.sh b/full-build.sh index d1e9da6c545..82330aac90e 100755 --- a/full-build.sh +++ b/full-build.sh @@ -2,7 +2,6 @@ MVN_ARGS=(\ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ - -Dit-archetype-tests-skip=true \ ) # args parsing inspired by https://gist.github.com/jehiah/855086 @@ -22,7 +21,7 @@ while [ "$1" != "" ]; do exit ;; --no-tests) - MVN_ARGS+=(-DskipTests=true) + MVN_ARGS+=(-DskipTests=true -Dit-archetype-tests-skip=true) ;; --local-repository) MVN_ARGS+=" -Dmaven.repo.local=$VALUE" diff --git a/org.eclipse.xtend.maven.archetype/pom.xml b/org.eclipse.xtend.maven.archetype/pom.xml index cfca1f4881c..5f6b5c41f9e 100644 --- a/org.eclipse.xtend.maven.archetype/pom.xml +++ b/org.eclipse.xtend.maven.archetype/pom.xml @@ -12,7 +12,8 @@ ${basedir}/.. - true + false + false @@ -53,14 +54,16 @@ maven-archetype-plugin ${it-archetype-tests-skip} - true + ${it-archetype-tests-debug} integration-test - true + + ${it-archetype-tests-debug} + @@ -84,7 +87,7 @@ - true + true diff --git a/org.eclipse.xtend.maven.archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/org.eclipse.xtend.maven.archetype/src/main/resources/META-INF/maven/archetype-metadata.xml index c5a92b2250c..ffa54f457b6 100644 --- a/org.eclipse.xtend.maven.archetype/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/org.eclipse.xtend.maven.archetype/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -9,7 +9,7 @@ UTF-8 - 1.8 + 17 diff --git a/org.eclipse.xtend.maven.archetype/src/test/resources/projects/first/archetype.properties b/org.eclipse.xtend.maven.archetype/src/test/resources/projects/first/archetype.properties index be7e417f87a..06f281f182b 100644 --- a/org.eclipse.xtend.maven.archetype/src/test/resources/projects/first/archetype.properties +++ b/org.eclipse.xtend.maven.archetype/src/test/resources/projects/first/archetype.properties @@ -2,5 +2,6 @@ sourceEncoding=UTF-8 groupId=integrationtest.group artifactId=integrationtest.artifactId version=1.0.0-SNAPSHOT +javaVersion=17 package=org.eclipse.xtend.xtend.archetype.integrationtest packageInPathFormat=org/eclipse/xtend/xtend-archetype/integrationtest From 0cf3b4e06f4feb61bcfb64b05f51f7cb7b7f9192 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 4 Dec 2024 14:53:51 +0100 Subject: [PATCH 10/14] use the invoker plugin to install dependencies before archetype ITs --- org.eclipse.xtend.maven.archetype/pom.xml | 32 +++++++++++++++++++++-- org.eclipse.xtend.maven.parent/pom.xml | 4 +++ org.eclipse.xtend.maven.plugin/pom.xml | 1 - 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/org.eclipse.xtend.maven.archetype/pom.xml b/org.eclipse.xtend.maven.archetype/pom.xml index 5f6b5c41f9e..14c01ed9458 100644 --- a/org.eclipse.xtend.maven.archetype/pom.xml +++ b/org.eclipse.xtend.maven.archetype/pom.xml @@ -14,6 +14,8 @@ ${basedir}/.. false false + + ${project.basedir}/target/.m2test @@ -50,11 +52,37 @@ + + + org.apache.maven.plugins + maven-invoker-plugin + + + + org.eclipse.xtext:xtext-dev-bom:${project.version}:pom + + ${localMavenRepositoryPath} + + + + install dependencies in local test repo + pre-integration-test + + install + + + test + + + + maven-archetype-plugin - ${it-archetype-tests-skip} ${it-archetype-tests-debug} + ${localMavenRepositoryPath} @@ -62,7 +90,7 @@ integration-test - ${it-archetype-tests-debug} + ${it-archetype-tests-skip} diff --git a/org.eclipse.xtend.maven.parent/pom.xml b/org.eclipse.xtend.maven.parent/pom.xml index b6002a28098..cdea2edec20 100644 --- a/org.eclipse.xtend.maven.parent/pom.xml +++ b/org.eclipse.xtend.maven.parent/pom.xml @@ -110,6 +110,10 @@ maven-source-plugin 3.2.1 + + maven-invoker-plugin + 3.5.0 + diff --git a/org.eclipse.xtend.maven.plugin/pom.xml b/org.eclipse.xtend.maven.plugin/pom.xml index f006b463a9e..c8798f6eda1 100644 --- a/org.eclipse.xtend.maven.plugin/pom.xml +++ b/org.eclipse.xtend.maven.plugin/pom.xml @@ -174,7 +174,6 @@ org.apache.maven.plugins maven-invoker-plugin - 3.5.0 - + diff --git a/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.xtend b/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.xtend index f7b86313f93..272900e4ccf 100644 --- a/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.xtend +++ b/org.eclipse.xtext.xtext.wizard/src/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.xtend @@ -105,7 +105,7 @@ class TargetPlatformProject extends ProjectDescriptor { �ENDIF� - + diff --git a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.java b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.java index d00bd8940bc..c182afcbc2e 100644 --- a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.java +++ b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.java @@ -247,7 +247,7 @@ public CharSequence target() { _builder.append(""); _builder.newLine(); _builder.append("\t\t\t"); - _builder.append(""); + _builder.append(""); _builder.newLine(); _builder.append("\t\t"); _builder.append(""); diff --git a/xtext-latest.target b/xtext-latest.target index 48f1c574cd3..ec93d3b5d1d 100644 --- a/xtext-latest.target +++ b/xtext-latest.target @@ -42,7 +42,7 @@ - + diff --git a/xtext-r202403.target b/xtext-r202403.target index 5b50e8771f3..ec5d9c6c41b 100644 --- a/xtext-r202403.target +++ b/xtext-r202403.target @@ -39,7 +39,7 @@ - + diff --git a/xtext-r202406.target b/xtext-r202406.target index 7c49e1938fd..8c3a3411499 100644 --- a/xtext-r202406.target +++ b/xtext-r202406.target @@ -39,7 +39,7 @@ - + diff --git a/xtext-r202409.target b/xtext-r202409.target index fc4eec68954..47f31b636a5 100644 --- a/xtext-r202409.target +++ b/xtext-r202409.target @@ -39,7 +39,7 @@ - + diff --git a/xtext-r202412.target b/xtext-r202412.target index b62a202b178..cb0bf37ed87 100644 --- a/xtext-r202412.target +++ b/xtext-r202412.target @@ -39,7 +39,7 @@ - + From 3f61155ef2b6bd045c9b349cdaa3de1602d25690 Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Mon, 2 Dec 2024 20:03:37 +0100 Subject: [PATCH 14/14] prepare 2025-03 oomph Signed-off-by: Christian Dietrich --- releng/org.eclipse.xtext.contributor/Xtext.setup | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/releng/org.eclipse.xtext.contributor/Xtext.setup b/releng/org.eclipse.xtext.contributor/Xtext.setup index 02d4e998918..e60684a2d30 100644 --- a/releng/org.eclipse.xtext.contributor/Xtext.setup +++ b/releng/org.eclipse.xtext.contributor/Xtext.setup @@ -71,6 +71,9 @@ label="Target Platform"> + @@ -520,9 +523,14 @@ + filter="(eclipse.target.platform=2025-03)"> xtext-latest + + xtext-r202412 +