Skip to main content



      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 11:43 Go to next message
Eclipse UserFriend
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 11:48 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Customize DSL file location in (maven) projects [message #1794766 is a reply to message #1794728] Thu, 06 September 2018 04:57 Go to previous messageGo to next message
Eclipse UserFriend
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 04:59] by Moderator

Re: Customize DSL file location in (maven) projects [message #1794769 is a reply to message #1794766] Thu, 06 September 2018 05:09 Go to previous message
Eclipse UserFriend
Don't know please look into the source code
Previous Topic:Stopping Xtext from replacing generated files/methods
Next Topic:Plain Language parser in xtext xbase
Goto Forum:
  


Current Time: Tue Jun 24 19:48:57 EDT 2025

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

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

Back to the top