Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Maven build fails when using my own XtextGenerator
Maven build fails when using my own XtextGenerator [message #1831246] Sat, 15 August 2020 04:18 Go to next message
Qiran Cong is currently offline Qiran CongFriend
Messages: 26
Registered: November 2019
Junior Member
Hi, I followed this tutorial for adding my postprocessor :
http://xtextcasts.org/episodes/18-model-optimization?autoplay=true

it works good in eclipse, but when I do maven build, the errors come out:
ERROR Mwe2Launcher - [XtextLinkingDiagnostic: null:14 Couldn't resolve reference to JvmType 'ExtendedGenerator'., XtextLinkingDiagnostic: null:15

the ExtendedGenerator looks like:
public class ExtendedGenerator extends XtextGenerator{
public ExtendedGenerator() {
new XtextStandaloneSetup() {
@Override
public Injector createInjector() {
return Guice.createInjector(new ExtendedRuntimeModule());
}
}.createInjectorAndDoEMFRegistration();
}
}

the mwe2 look like:
Workflow {
component = ExtendedGenerator {
configuration = {
....

I think I might need some extra config to make it built in maven
Re: Maven build fails when using my own XtextGenerator [message #1831257 is a reply to message #1831246] Sat, 15 August 2020 16:28 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13641
Registered: July 2009
Senior Member
Hi, you need to move the custom generator class to a separate module / plugin and build that one first / before the dsl module

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Maven build fails when using my own XtextGenerator [message #1831542 is a reply to message #1831257] Sat, 22 August 2020 09:28 Go to previous message
Qiran Cong is currently offline Qiran CongFriend
Messages: 26
Registered: November 2019
Junior Member
thanks!
Previous Topic:How can I use xtext embedded editor as a real editor page?
Next Topic:How can I override STRING?
Goto Forum:
  


Current Time: Tue Oct 27 16:10:46 GMT 2020

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

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

Back to the top