Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle build failure with Java 15 #1968

Closed
lhstrh opened this issue Apr 17, 2021 · 10 comments
Closed

Gradle build failure with Java 15 #1968

lhstrh opened this issue Apr 17, 2021 · 10 comments

Comments

@lhstrh
Copy link

lhstrh commented Apr 17, 2021

Building an Xtext project with Gradle fails when build.gradle declares source and target compatibility with Java 15.

To reproduce:

  • create a new Xtext project from scratch
  • edit build.gradle in the parent project and specify: sourceCompatibility = '15' and targetCompatibility = '15'
  • run ./gradlew build

This results in the following (not very helpful) error message:

> Task :org.lflang:generateXtext FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':org.lflang:generateXtext'.
> java.lang.NullPointerException (no error message)

Here's the stacktrace obtained by invoking ./gradlew build --stacktrace:

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':org.lflang:generateXtext'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:207)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:205)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:186)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:114)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:409)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:399)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:94)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:356)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.NullPointerException
        at org.eclipse.xtext.xbase.compiler.JvmModelGenerator.reassignSuperType(JvmModelGenerator.java:1081)
        at org.eclipse.xtext.xbase.compiler.JvmModelGenerator.assignThisAndSuper(JvmModelGenerator.java:1054)
        at org.eclipse.xtext.xbase.compiler.JvmModelGenerator.generateType(JvmModelGenerator.java:214)
        at org.eclipse.xtext.xbase.compiler.JvmModelGenerator._internalDoGenerate(JvmModelGenerator.java:202)
        at org.eclipse.xtext.xbase.compiler.JvmModelGenerator.internalDoGenerate(JvmModelGenerator.java:1603)
        at org.eclipse.xtext.xbase.compiler.JvmModelGenerator.doGenerate(JvmModelGenerator.java:185)
        at org.eclipse.xtend.core.compiler.XtendGenerator.doGenerate(XtendGenerator.java:96)
        at org.eclipse.xtend.core.compiler.XtendGenerator.doGenerate(XtendGenerator.java:112)
        at org.eclipse.xtext.generator.GeneratorDelegate.doGenerate(GeneratorDelegate.java:44)
        at org.eclipse.xtext.generator.GeneratorDelegate.generate(GeneratorDelegate.java:35)
        at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.generate(IncrementalBuilder.java:341)
        at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.lambda$launch$2(IncrementalBuilder.java:278)
        at com.google.common.collect.Iterators$6.transform(Iterators.java:783)
        at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47)
        at com.google.common.collect.FluentIterable.copyInto(FluentIterable.java:791)
        at org.eclipse.xtext.build.ClusteringStorageAwareResourceLoader.executeClustered(ClusteringStorageAwareResourceLoader.java:69)
        at org.eclipse.xtext.build.BuildContext.executeClustered(BuildContext.java:55)
        at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.launch(IncrementalBuilder.java:259)
        at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:404)
        at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:386)
        at org.xtext.gradle.builder.XtextGradleBuilder.doBuild(XtextGradleBuilder.java:319)
        at org.xtext.gradle.builder.XtextGradleBuilder.build(XtextGradleBuilder.java:192)
        at org.xtext.gradle.tasks.XtextGenerate.generate(XtextGenerate.java:166)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
        at org.gradle.api.internal.project.taskfactory.IncrementalTaskInputsTaskAction.doExecute(IncrementalTaskInputsTaskAction.java:47)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:42)
        at org.gradle.api.internal.project.taskfactory.AbstractIncrementalTaskAction.execute(AbstractIncrementalTaskAction.java:25)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.run(ExecuteActionsTaskExecuter.java:569)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:395)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:387)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:84)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:554)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:537)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:108)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:278)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:267)
        at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$0(ExecuteStep.java:32)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:32)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)
        at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:67)
        at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:36)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:49)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:34)
        at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:43)
        at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)
        at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)
        at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:34)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:44)
        at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:54)
        at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:38)
        at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)
        at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:159)
        at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:72)
        at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:43)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:92)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:85)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:94)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:79)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:53)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:78)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:39)
        at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40)
        at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28)
        at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:194)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:186)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:114)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:409)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:399)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:94)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:356)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
@cdietrich
Copy link
Contributor

cdietrich commented Apr 18, 2021

we currently do not support any newer source and target compatibilities than 11
inoffically it should work when you use a java 15 or 16 to drive the build against java 11 src and target (you may have to use gradle 6.8.3 then)

@lhstrh
Copy link
Author

lhstrh commented Apr 18, 2021

Thanks, Christian. The reason we're interested in Java 15 is that it offers nice syntax for (multi-line) string templates similar to what Xtend offers. We want to phase out our Xtend code, but we haven't yet found a reasonable alternative. We looked at Kotlin, but its integration with Eclipse is completely broken, and the IntelliJ support for Xtext is broken also. Do you have any suggestions for alternatives we might try?

@cdietrich
Copy link
Contributor

Unfortunately there is no templating that can compete with Xtend.
If you want to experiment with Xtext without Xtend you can change the workflow to create java code for test and generator and remove the Xtend gradle plugin

@lhstrh
Copy link
Author

lhstrh commented Apr 18, 2021

Well, yes, we can switch to Java 11, I'm aware of that. (And I noticed you're doing the same #1952.) But that will make our code generator code (currently written in Xtend) a lot less readable, which is why we were hoping to use Java 15. In Java 15, one print "Hello World" using the following code:

String foo = "World";
System.out.println("Hello %s".formatted(foo));

or

System.out.println("Hello %s".replace("$foo", foo));

which in Kotlin would look like:

val foo = "World"
println("Hello $foo")

I think all of these options (which also feature indentation-friendly multi-line string blocks, not covered here) seem very reasonable alternatives to Xtend, which would look like:

val foo = "World"
println('''Hello «foo»''')

Notice that the Kotlin code is even more compact than the Xtend code, and it offers inlined expressions, too...

fun main(args: Array<String>) {
    val a = 5
    val b = 6

    val myString = """
    |${if (a > b) a else b}
"""
    println("Larger number is: ${myString.trimMargin()}")
}

(It would print Larger number is: 6.)

@cdietrich
Copy link
Contributor

Hi @lhstrh

if you want to continue experimenting (using Xtext 2.26.0-SNAPSHOT):

		maven { url 'https://ci.eclipse.org/xtext/job/xtext-lib/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/' }
		maven { url 'https://ci.eclipse.org/xtext/job/xtext-core/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/' }
		maven { url 'https://ci.eclipse.org/xtext/job/xtext-extras/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/' }
		maven { url 'https://ci.eclipse.org/xtext/job/xtext-xtend/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/' }
		maven { url 'https://ci.eclipse.org/xtext/job/xtext-maven/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/' }
		maven { url 'https://ci.eclipse.org/xtext/job/xtext-web/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/' }

@cdietrich
Copy link
Contributor

or for maven users (instead of sonatype oss)

		<repository>
			<id>lib</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-lib/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</repository>
		<repository>
			<id>core</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-core/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</repository>
		<repository>
			<id>extras</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-extras/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</repository>
		<repository>
			<id>xtend</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-xtend/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</repository>
		<repository>
			<id>web</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-web/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</repository>
		<repository>
			<id>maven</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-maven/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</repository>

...

				<pluginRepository>
			<id>libp</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-lib/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</pluginRepository>
		<pluginRepository>
			<id>corep</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-core/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</pluginRepository>
		<pluginRepository>
			<id>extrasp</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-extras/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</pluginRepository>
		<pluginRepository>
			<id>xtendp</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-xtend/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</pluginRepository>
		<pluginRepository>
			<id>webp</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-web/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</pluginRepository>
		<pluginRepository>
			<id>mavenp</id>
			<url>https://ci.eclipse.org/xtext/job/xtext-maven/job/cd_java15experiments/lastSuccessfulBuild/artifact/build/maven-repository/</url>
		</pluginRepository>

@lhstrh
Copy link
Author

lhstrh commented Apr 22, 2021

It turned out that the Eclipse Kotlin plugin issue that I mentioned went away after switching to Java 11. So far, it looks like Kotlin could serve as a perfect drop-in replacement for our Xtend code. However, generated language artifacts such as *StandaloneSetup.xtend and *RuntimeModule.xtend still get generated. Is there a way to configure Xtext to either not generate those or generate them in Java?

@cdietrich
Copy link
Contributor

cdietrich commented Apr 22, 2021

Please have a look what the new Xtext project wizard creates in more recent Xtext versions and compare it with your workflow

// as precreated by the wizard
			code = {
				encoding = "UTF-8"
				lineDelimiter = "\n"
				fileHeader = "/*\n * generated by Xtext \${version}\n */"
				preferXtendStubs = false
			}
...
// an manually adjust
			//generator = {
			//	generateXtendStub = true
			//}
			junitSupport = {
				junitVersion = "5"
				generateXtendStub = false
			}

@lhstrh
Copy link
Author

lhstrh commented Apr 22, 2021

Thanks! This works!

@cdietrich
Copy link
Contributor

Java 17 Update is tracked via #1982 so i will close this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants