prevent compiling in xtext-maven-plugin [message #1753007] |
Wed, 01 February 2017 00:35  |
Eclipse User |
|
|
|
I created a pom.xml. The contents are basically the same in this link:
https://github.com/ghillairet/xcore-maven-example/blob/master/pom.xml. It can compile without problem.
But, I need my .xcore to refer to some methods in a Test.xtend file. And I am getting an error saying "org.generator.Test cannot be resolved". I don't need it to compile the java classes. I just want xcore to generate the java classes, as these will then be compiled together with the xtend classes. Is it possible to configure the xtext-maven-plugin to just tell xcore to generate the classes?
[Updated on: Wed, 01 February 2017 00:40] by Moderator
|
|
|
|
|
|
|
|
Re: prevent compiling in xtext-maven-plugin [message #1753016 is a reply to message #1753014] |
Wed, 01 February 2017 02:33   |
Eclipse User |
|
|
|
i managed to make it work. but I encountered another problem.
My project's flow is this:
xcore
-> used by the xtext grammar
-> also does some operations and refers to the methods defined in xtend.
xtend
-> transforms and generate the classes
-> calls the op methods in xcore
-> refers to the xtext variables
Thus, xcore depends on the java classes of xtend, and xtend depends on the xtext variables which also depends on the xcore stuffs.
All these are in one project. This is not a problem if build is being handled by Eclipse IDE. But when being run by the maven script in a "clean" environment (no generated sources from xtend yet), this becomes a problem.
So, I was thinking that for XcoreStandaloneSetup, it just simple generates the .java files without checking for the validity. The validity will be checked anyway, when xtend is compiled. I noticed that with Eclipse IDE, only the java files are generated. There are no .class files. But when running maven, .class files are there. Thus, is it possible to skip this part (the .class files) of the xcore compiler?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05332 seconds