Skip to main content



      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 07:26 Go to next message
Eclipse UserFriend
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 16:00 Go to previous messageGo to next message
Eclipse UserFriend
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
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 08:53 Go to previous messageGo to next message
Eclipse UserFriend
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 08:54] by 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 09:31 Go to previous messageGo to next message
Eclipse UserFriend
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 09:49 Go to previous messageGo to next message
Eclipse UserFriend
i dont undestand this question. please elaborate
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 04:15 Go to previous messageGo to next message
Eclipse UserFriend
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 04:39] by 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 04:22 Go to previous messageGo to next message
Eclipse UserFriend
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>
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 04:40 Go to previous messageGo to next message
Eclipse UserFriend
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 07:05 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 13:44:03 EDT 2025

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

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

Back to the top