Using Gradle to Generate XCore and IncQuery code [message #1711186] |
Tue, 13 October 2015 19:53  |
Eclipse User |
|
|
|
I'm trying to generate EMF models outside of Eclipse using Gradle. I've tried the Gradle build script included at the end. I pieced this together from the one resource I could find. A working example showing both incQuery and XCore would be extremely helpful.
The error I am getting:
Caused by: java.lang.ClassNotFoundException: org.eclipse.xtext.ecore.EcoreSupportStandaloneSetup
The Build Script
plugins {
id "org.xtext.xtext" version "0.3.25"
}
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
// I've tried a whole slew of dependencies here to no avail
xtextTooling 'org.eclipse.emf:org.eclipse.emf.ecore.xcore:1.3.1'
}
xtext {
version = '2.8.4'
sources {
srcDir 'src/main/xcore'
}
languages {
xcore {
setup = 'org.eclipse.emf.ecore.xcore.XcoreStandaloneSetup'
output.dir = 'build.xcore'
}
}
}
[Updated on: Tue, 13 October 2015 19:53] by Moderator
|
|
|
Re: Using Gradle to Generate XCore and IncQuery code [message #1711212 is a reply to message #1711186] |
Wed, 14 October 2015 03:31   |
Eclipse User |
|
|
|
Hi Hassan,
I guess you are missing some dependencies. According to the pom file in maven central (https://repo1.maven.org/maven2/org/eclipse/xtext/xtext-maven-plugin/2.9.0.beta5/xtext-maven-plugin-2.9.0.beta5.pom), the plug-in you are missing should be 'org.eclipse.xtext:org.eclipse.xtext.ecore'. Maybe other dependencies are also missing, look for the definition of the plug-in.
About IncQuery support, we don't have a Gradle compiler, and we had to customize the Maven compiler to load some EPackages into the EPackage registry. If I recall orrectly, Gradle can execute Java code in the build script, so it is possible that you can do it without dedicated support, however, I have no real experience with Gradle, so I cannot be sure. Furthermore, I don't know about anybody who has tried to execute the IncQuery generator from Gradle.
I hope this was helpful,
Zoltán
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04915 seconds