Xtext maven and Xcore model [message #1403232] |
Tue, 22 July 2014 10:31  |
Eclipse User |
|
|
|
I am using Xtext 2.6 and I have a grammar which uses an Xcore model contained within the same project as the grammar.
Now I want to generate my DSL with Maven and I followed the instructions in the Xtext documentation.
I managed to generate Java classes from my Xcore model and then the generation of the grammar is started, but fails, because the path to my Xcore model is unmapped:
The path '/com.hlag.fit.sql/model/FitSql.xcore' is unmapped
I did try to map it to classpath:, but then I get an error that the src folder under C:\{Path to my JRE\ext is not accessible (which is true, as I am not admin on my PC).
What resource does Xtext try load from this strange location?
Does somebody have a working Maven example with an Xcore model in the same project?
Thanks
Jan
|
|
|
Re: Xtext maven and Xcore model [message #1403446 is a reply to message #1403232] |
Wed, 23 July 2014 13:31   |
Eclipse User |
|
|
|
On 22/07/2014 16:31, Jan Rosczak wrote:
> I am using Xtext 2.6 and I have a grammar which uses an Xcore model
> contained within the same project as the grammar.
>
> Now I want to generate my DSL with Maven and I followed the instructions
> in the Xtext documentation.
>
> I managed to generate Java classes from my Xcore model and then the
> generation of the grammar is started, but fails, because the path to my
> Xcore model is unmapped:
>
> The path '/com.hlag.fit.sql/model/FitSql.xcore' is unmapped
>
> I did try to map it to classpath:, but then I get an error that the src
> folder under C:\{Path to my JRE\ext is not accessible (which is true, as
> I am not admin on my PC).
>
> What resource does Xtext try load from this strange location?
> Does somebody have a working Maven example with an Xcore model in the
> same project?
Yes :) here it is:
https://github.com/LorenzoBettini/xsemantics/blob/tycho/plugins/it.xsemantics.dsl/pom.xml
but I'm not using the method in the documentation: I use the fornax
plugin to run the mwe2 workflow (also for the Xtext artifacts), so that
I don't have to change the mwe2. In the above pom the first mwe2
generates the emf-gen with Xcore.
Hope this helps
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
|
|
|
Re: Xtext maven and Xcore model [message #1403578 is a reply to message #1403446] |
Thu, 24 July 2014 09:39  |
Eclipse User |
|
|
|
Yes, it did help a lot. But I also figured out, that for the workflow to work correctly I need the .project file in my project build directory, which I figured was not necessary for the Maven build. But now it works.
Thanks
Jan
|
|
|
Powered by
FUDForum. Page generated in 0.06438 seconds