How to generate and package xmi file with maven and xtext 2.9 [message #1714687] |
Sun, 15 November 2015 21:13 |
David Baum Messages: 20 Registered: August 2014 |
Junior Member |
|
|
Hello everyone,
yesterday I tried to port our codebase from xtext 2.8 to xtext 2.9 rc but I have a small problem. Our project structure is like this, using maven as build system:
- mydsl1
- mydsl2
- using_dsl_project
- using_dsl_project_parent
Thas was working with xtext 2.8 and maven (and tycho). When porting the mydsl-projects to XText 2.9 based on the pom from the example project created with the wizard, the created jar in the maven repository does not contain any xmi/xtextbin file anymore. This causes the following error message in the using_dsl_project:
Error injecting constructor, org.eclipse.emf.common.util.WrappedException: org.eclipse.xtext.resource.ClasspathUriResolutionException: org.eclipse.xtext.resource.FileNotFoundOnClasspathException: Couldn't find resource on classpath. URI was 'classpath:/org/example/MyDSL1.xmi'
in the using_dsl_project the mydsl1 project is added as dependency. The workflow I try to invoke looks like this:
module using_dsl_project_run
var projectName = "using_dsl_run"
var runtimeProject = "../${projectName}"
Workflow {
bean = org.eclipse.emf.mwe.utils.StandaloneSetup {
platformUri = "${runtimeProject}/.."
registerGeneratedEPackage = "org.example.MyDSL1Package"
}
component = org.eclipse.xtext.mwe.Reader {
path = "./input"
register = org.example.MyDSL1StandaloneSetup {}
loadResource = {
slot = "mydsl"
}
}
component = org.svis.generator.ResolveLazyComponent {}
component = org.example.MyDSL12MyDSL2 {
modelSlot = "mydsl"
}
}
The error message at the reader component. Do I have to change something in the mydsl project to create the xtextbin file or am I missing something different?
Thanks in advance.
[Updated on: Mon, 16 November 2015 12:33] Report message to a moderator
|
|
|
|
|
|
Re: How to generate and package xmi file with maven and xtext 2.9 [message #1715222 is a reply to message #1715115] |
Fri, 20 November 2015 11:21 |
David Baum Messages: 20 Registered: August 2014 |
Junior Member |
|
|
I get the following warning:
[WARNING] The assembly descriptor contains a filesystem-root relative reference, which is not cross platform compatible /
[INFO] Building jar: /home/naraesk/Alma Mater/Forschung/Promotion/workspace/generator_old/ws/org.xtext.example.mydsl1.parent/org.xtext.example.mydsl1/target/org.xtext.example.mydsl1-1.0.0-SNAPSHOT.jar
[WARNING] Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing.
Instead of attaching the assembly file: /home/naraesk/Alma Mater/Forschung/Promotion/workspace/generator_old/ws/org.xtext.example.mydsl1.parent/org.xtext.example.mydsl1/target/org.xtext.example.mydsl1-1.0.0-SNAPSHOT.jar, it will become the file for main project artifact.
NOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!
[WARNING] Replacing pre-existing project main-artifact file: /home/naraesk/Alma Mater/Forschung/Promotion/workspace/generator_old/ws/org.xtext.example.mydsl1.parent/org.xtext.example.mydsl1/target/org.xtext.example.mydsl1-1.0.0-SNAPSHOT.jar
with assembly file: /home/naraesk/Alma Mater/Forschung/Promotion/workspace/generator_old/ws/org.xtext.example.mydsl1.parent/org.xtext.example.mydsl1/target/org.xtext.example.mydsl1-1.0.0-SNAPSHOT.jar
However the xtext example project, created by the project wizard, produces the same warning. And in the example project the resulting jar contains the xtextbin file. But besides naming/used packages I don't see any differences between my project and the example project. And, btw, I'm using "mvn clean install" for maven, or am I supposed to run a different command?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05306 seconds