Maven/Tycho 构建在引用现有 Ecore 模型时不适用于 Xtext DSL

问题描述

我有一个基于 Xtext 的 DSL 项目,它指的是另一个项目中定义的 Ecore 模型。虽然在 eclipse 中一切正常,但不知何故 maven build 无法运行。

命令 - mvn 全新安装

错误 -

0 错误 Mwe2Launcher - [XtextLinkingDiagnostic: null:13 无法解析对 JvmType 'ExpressionGeneratorModule'的引用。,XtextLinkingDiagnostic:null:14 无法解析对 JvmIdentifiableElement 'project'的引用。,XtextLinkingDiagnostic:'nullt:31解析对 JvmIdentifiableElement 'code'的引用。,XtextLinkingDiagnostic:null:32 无法解析对 JvmIdentifiableElement 'encoding'的引用。,XtextLinkingDiagnostic:null:33 无法解析对 JvmIdentifiableElement 'lineDelimiter'的引用。,XtextLinkingDiagnostic:null: t 解析对 JvmIdentifiableElement 'fileHeader'的引用。,XtextLinkingDiagnostic:null:35 无法解析对 JvmIdentifiableElement 'preferXtendStubs'的引用。] java.lang.IllegalStateException:[XtextLinkingDiagnostic:null:13 无法解析对 JvmType 'ExpressionGeneratorModule'的引用。,XtextLinkingDiagnostic:null:14 无法解析对 JvmIdentifiableElement 'project'的引用。,XtextLinkingDiagnostic:null:31 无法解析对 JvmIdentifiableElement 'code' 的引用。,XtextLinkingDiagnostic:null:32 无法解析对 JvmIdentifiableElement 'encoding'的引用。,XtextLinkingDiagnostic:null:33 无法解析对 JvmIdentifiableElement 'lineDelimiter'的引用。,XtextLinkingDiagnostic:nullt3解析对 JvmIdentifiableElement 'fileHeader'. 的引用,XtextLinkingDiagnostic:null:35 无法解析对 JvmIdentifiableElement 'preferXtendStubs'的引用。]

实施细节 -

  1. Xtext 版本 - 2.22.0

  2. 基于 Maven/tycho 的 eclipse 插件

  3. 在清单中添加了 org.eclipse.xtext.generator 包。

  4. 引用资源 = “平台:/resource/com.act21.mamba.model/model/expression.genmodel” 存在于工作流程中。

  5. 导入 org.eclipse.xtext.generator.* ,存在 在工作流程中。

语法片段-

grammar com.act21.mamba.expression.dsl.ExpressionDSL with 
org.eclipse.xtext.common.Terminals

import "http://www.act21.io/mamba/model/expression"
import "http://www.eclipse.org/emf/2002/Ecore" as ecore 

ExpressionModel:
expression=Expression;

Expression:
Comparison | Functions;

我不确定我在这里遗漏了什么。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...