Hello folks, first time poster here and wondered if anyone could help me with an issue I have.
I have built a grammar for simplifying a xml-file generation. When the grammar was done I was asked to make a maven build for my project and its here I have some problems.
I made a new project to learn about maven since I havent used it before and I used a project to have something to work with.
(Since its my first post I am not allowed to link outside of the forum, but I used xtext-maven-example 2.3.0 from github by vorburger)
Maven built everything and it seemed fine so I started meddling with the MyDslGenerator.xten to try and make an xml file since that is what I do in my original project and now I am stuck.
I get the following error message:
ERROR: MyDslGenerator.xtend - C:\...\generator\MyDslGenerator.xtend
13: Couldn't resolve reference to JvmType 'Model'.
31: Couldn't resolve reference to JvmType 'Greeting'.
and so on. I attach the errors for minimizing the size.
So seems to me that it cant find the XText Artifacts for Model and Greeting and I was wondering if anyone might be able to tell me why this happens when I try to meddle with the MyDslGenerator.xtend file?
Everything seems alright in eclipse, don't know if that might be the cause but I built XText Artifacts in eclipse.
MyDslGenerator.xtend to show the modifications I made
errors.txt to show the errors I get when running mvn install
Hmm... it seems to be the same project I was working from but this has a modified generator and works with maven (although I have 53 errors in eclipse). So seems I did something wrong when I created a new project of my own... well, time to find out what and thanks for the help!
Got two followup questions if thats ok?
I found something interesting when I opened this project.
The folder: org.xtext.example.mydsl.standalone
Was read as: org.eclipse.emf.mwe2.standalone
in eclipse, any reason for that?
And when I try to use the jar file created from this maven build nothing seems to happen, do I need to do something special to use it?
(It seems to have all the files when I open it in 7zip to check its contents)
(Spoled windows used thats used to things happening when I double click on exe and jar files )
*bangs head on table*
Yup, it works, I failed at using the "java -jar ./target/org.xtext.example.mydsl.generator-1.0.0-SNAPSHOT.jar -src ./src/test/mydsl/Example.mydsl -targetdir ./target" command in the command prompt.
So now I have a jar that makes the files I want after a maven build thanks a lot!
Now to make it work on my own project and then to try and make a grafical editor for it... have a feeling I will pop up in here to ask about that as well later but its another subject so should be under another topic.
Thanks for all the help and patience... since everything seems to have been working from the start just me who didn't know how to use the tools I was given.