Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Broken Build when changing grammar with org.eclipse.xtext.xbase.Xbase(Maven build issues with xtext projects created from new wizard using xbase)
Broken Build when changing grammar with org.eclipse.xtext.xbase.Xbase [message #1802615] Tue, 12 February 2019 21:18 Go to next message
Duncan Krebs is currently offline Duncan KrebsFriend
Messages: 6
Registered: July 2014
Junior Member
Hi,
I'm trying to modify a xtext project I created in the new wizard to extend the xbase grammar instead of the terminals. When running the parent pom out of the box all my projects build, but when I update my grammar to include "with org.eclipse.xtext.xbase.Xbase" the maven build breaks with this error below. How do I update the build files to make everything build again?! - Duncan

721 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  text.xtext.generator.XtextGenerator  - Generating common infrastructure
9743 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Problems running workflow com.krebsnet.xstream.script.GenerateXScript: 
[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: XtextGenerator)
	 org.eclipse.xtext.util.RuntimeIOException: java.io.FileNotFoundException: /Users/dkrebs/tradenet/code/platform/0.1.0/workspaces/0.1.0-20/com.xxxx.xstream.script.parent/com.xxxx.xstream.script/../com.krebxxxnet.xstream.script/src-gen/com/xxxx/xstream/script/parser/antlr/internal/InternalXScriptLexer.java (No such file or directory)
Re: Broken Build when changing grammar with org.eclipse.xtext.xbase.Xbase [message #1802619 is a reply to message #1802615] Tue, 12 February 2019 21:58 Go to previous messageGo to next message
Duncan Krebs is currently offline Duncan KrebsFriend
Messages: 6
Registered: July 2014
Junior Member
I found that by adding the snippet below in my generate file I got past the file not found exception in the stack trace I posted in my question:

parserGenerator = {
				antlrParam = "-Xconversiontimeout"
				antlrParam = "5000"
				options = {
					ignoreCase = true
					backtrack = false
					memoize = true
				}
			}


Although running the maven build I get a new error below, but it works fine when i run the generate script. I think I'm close but still driving me crazy.

Caused by: java.io.IOException: The path '/org.eclipse.xtext.xbase/model/Xbase.genmodel' is unmapped

Re: Broken Build when changing grammar with org.eclipse.xtext.xbase.Xbase [message #1802641 is a reply to message #1802615] Wed, 13 February 2019 07:44 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 687
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Please compare your setup to the Domainmodel Example. This is an example Xbase based language. Install it with File / New / Examples.
Re: Broken Build when changing grammar with org.eclipse.xtext.xbase.Xbase [message #1802902 is a reply to message #1802641] Mon, 18 February 2019 18:01 Go to previous messageGo to next message
Duncan Krebs is currently offline Duncan KrebsFriend
Messages: 6
Registered: July 2014
Junior Member
Thanks for the tip, I added the domain model projects in my workspace but when trying to build from the releng pom i get this error.

[ERROR] An error occurred while transferring artifact packed: osgi.bundle,org.eclipse.xtext,2.17.0.v20190213-0949 from repository http://download.eclipse.org/modeling/tmf/xtext/updates/nightly/head:
[ERROR]    Problems downloading artifact: osgi.bundle,org.eclipse.xtext,2.17.0.v20190213-0949.:
[ERROR]       SHA-256 hash is not as expected. Expected: 1fc929aee33f0af614e9d083c7b22fd4bd83fac5e310ea43728b0f7ea33944ee and found 3de7be7f34e37ac74ba68841612fc2a2a7d8d904e6faf62414b59f6b7b47088f.
[ERROR] Internal error: org.eclipse.tycho.repository.local.MirroringArtifactProvider$MirroringFailedException: Could not mirror artifact osgi.bundle,org.eclipse.xtext,2.17.0.v20190213-0949 into the local Maven repository.See log output for details. -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: org.eclipse.tycho.repository.local.MirroringArtifactProvider$MirroringFailedException: Could not mirror artifact osgi.bundle,org.eclipse.xtext,2.17.0.v20190213-0949 into the local Maven repository.See log output for details.
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:120)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.eclipse.tycho.repository.local.MirroringArtifactProvider$MirroringFailedException: Could not mirror artifact osgi.bundle,org.eclipse.xtext,2.17.0.v20190213-0949 into the local Maven repository.See log output for details.
	at org.eclipse.tycho.repository.local.MirroringArtifactProvider.downloadArtifact(MirroringArtifactProvider.java:226)
Re: Broken Build when changing grammar with org.eclipse.xtext.xbase.Xbase [message #1802910 is a reply to message #1802902] Mon, 18 February 2019 20:18 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
Please try with a clean maven repo or using the release version 2.16.0

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:General Problem with Grammar and Generator
Next Topic:Overriding Rules - Erroneos Generated Interfaces
Goto Forum:
  


Current Time: Fri Aug 23 09:57:39 GMT 2019

Powered by FUDForum. Page generated in 0.01516 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top