Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Customize DSL file location in (maven) projects(How to change the default src/main/java to custom value)
Customize DSL file location in (maven) projects [message #1794727] Wed, 05 September 2018 15:43 Go to next message
Karsten Wilken is currently offline Karsten WilkenFriend
Messages: 50
Registered: August 2016
Member
The DSL files are expected to be located within the src/main/java folder. (For maven projects)

For example:
src/main/java/example.mydsl

What is the recommended way to change the expected location?

My goal is something like:
src/main/xtext/example.mydsl

I'm not sure if I just searched for the wrong keywords but I didn't find any topics regarding this issue.
Re: Customize DSL file location in (maven) projects [message #1794728 is a reply to message #1794727] Wed, 05 September 2018 15:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12388
Registered: July 2009
Senior Member
am not sure if i get you

usually you use <artifactId>build-helper-maven-plugin</artifactId> to determine source folders in maven or via <sourceDirectory>src</sourceDirectory>

and you can do something like this in the plugin https://github.com/eclipse/xtext-maven/blob/3229f65bdf59f4197240b2e46c17438c898a4065/org.eclipse.xtext.maven.plugin/src/test/resources/it/generate/maven-config/pom.xml


Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Customize DSL file location in (maven) projects [message #1794766 is a reply to message #1794728] Thu, 06 September 2018 08:57 Go to previous messageGo to next message
Karsten Wilken is currently offline Karsten WilkenFriend
Messages: 50
Registered: August 2016
Member
Thank you Christian!

This part is what I was looking for:
<sourceRoots>
	<sourceRoot>model2</sourceRoot>
	<sourceRoot>model</sourceRoot>
</sourceRoots>


Is there a way to define the "sourceRoot" for the language? Instead of setting it for each project individually?

Simular to the OutputConfig?

[Updated on: Thu, 06 September 2018 08:59]

Report message to a moderator

Re: Customize DSL file location in (maven) projects [message #1794769 is a reply to message #1794766] Thu, 06 September 2018 09:09 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12388
Registered: July 2009
Senior Member
Don't know please look into the source code

Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Stopping Xtext from replacing generated files/methods
Next Topic:Plain Language parser in xtext xbase
Goto Forum:
  


Current Time: Sun Nov 18 10:35:55 GMT 2018

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

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

Back to the top