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: 14661
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

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: Fri Mar 29 15:48:02 GMT 2024

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

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

Back to the top