Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » building the xtext project with the maven build with other java projects(I am generating some java classes using xtext. I have a existing project with which i want to build the DSL project as well.)
building the xtext project with the maven build with other java projects [message #1771030] Mon, 21 August 2017 11:26 Go to next message
Suprith S is currently offline Suprith SFriend
Messages: 43
Registered: July 2017
Location: Frankfurt
Member
I am using xtext 2.12.0 I have checked on the net. I made few changes to the existing parent pom.xml. I see that the grammarUri has to be changed to the platformURi in the mwe2 file. In 2.12.0 I did not find this kind of a structure to fill in the path as it uses the rootpath.

I also want to know if any documentation is available for this scenario for xtext 2.12 version.
Re: building the xtext project with the maven build with other java projects [message #1771089 is a reply to message #1771030] Mon, 21 August 2017 20:00 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12322
Registered: July 2009
Senior Member
can you elaborate a bit more on what you want to achieve and what you are doing.
did you have a look at what the new xtext project wizard creates


Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: building the xtext project with the maven build with other java projects [message #1771257 is a reply to message #1771089] Wed, 23 August 2017 12:53 Go to previous messageGo to next message
Suprith S is currently offline Suprith SFriend
Messages: 43
Registered: July 2017
Location: Frankfurt
Member
Hi,
I have configured my maven poms and it is working. But my problem I would like to generate the files in a particular path in a project. Also I want to pick my dsl file in the project from a different destination other than src. I would like to know how I can generate the files in different paths.

I have 4 generators seperately for each type of generation. Like from a single model I am generating, XML,HTML, Java, Javascipt, SQL and also Groovy.


Now i want to generate each type of file in different package respectively in an existing project. I have used dependency injection for the generators.

I would like to know where I can alter the generation of files in the structure of my existing project.

Thanks in advance,
Suprith

[Updated on: Wed, 23 August 2017 12:54]

Report message to a moderator

Re: building the xtext project with the maven build with other java projects [message #1771262 is a reply to message #1771257] Wed, 23 August 2017 13:31 Go to previous messageGo to next message
Suprith S is currently offline Suprith SFriend
Messages: 43
Registered: July 2017
Location: Frankfurt
Member
Hi ,
I could resolve this.


I would like to know how we could pick the dsl file while building a project apart from a different destination. where can I change this.??
Re: building the xtext project with the maven build with other java projects [message #1771265 is a reply to message #1771262] Wed, 23 August 2017 13:49 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12322
Registered: July 2009
Senior Member
i dont undestand this question. please elaborate

Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: building the xtext project with the maven build with other java projects [message #1771339 is a reply to message #1771265] Thu, 24 August 2017 08:15 Go to previous messageGo to next message
Suprith S is currently offline Suprith SFriend
Messages: 43
Registered: July 2017
Location: Frankfurt
Member
Hi,

I have a project which is using the DSL I have made. Now I see that the sample.dsl file is picked only if it is a part of the src/main/java path and generating files properly. I would like to place the sample.dsl file in the path src/main/resources and do the same code generation using maven plugin. I would like to know how to modify this .

Thanks,
Suprith

[Updated on: Thu, 24 August 2017 08:39]

Report message to a moderator

Re: building the xtext project with the maven build with other java projects [message #1771340 is a reply to message #1771339] Thu, 24 August 2017 08:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12322
Registered: July 2009
Senior Member
you can either configure that folder as source folder with maven means (e.g. buildhelper plugins)
or specify sourceRoots inside congiguration of the plugin

e.g.

<sourceroots>
<root>${basedir}/src</root>
<root>${basedir}/emf-gen</root>
</sourceroots>


Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: building the xtext project with the maven build with other java projects [message #1771344 is a reply to message #1771340] Thu, 24 August 2017 08:40 Go to previous messageGo to next message
Suprith S is currently offline Suprith SFriend
Messages: 43
Registered: July 2017
Location: Frankfurt
Member
thanks will try this
Re: building the xtext project with the maven build with other java projects [message #1771360 is a reply to message #1771344] Thu, 24 August 2017 11:05 Go to previous message
Suprith S is currently offline Suprith SFriend
Messages: 43
Registered: July 2017
Location: Frankfurt
Member
Hi
Thanks. This solution worked for me.


Regards,
Suprith
Previous Topic:Confusing error message when switching on type with rewrite rule
Next Topic:Using ParseHelper outside of the test project
Goto Forum:
  


Current Time: Thu Oct 18 11:56:32 GMT 2018

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

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

Back to the top