问题描述
我有一个基于 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'的引用。]
实施细节 -
-
Xtext 版本 - 2.22.0
-
基于 Maven/tycho 的 eclipse 插件。
-
在清单中添加了 org.eclipse.xtext.generator 包。
-
引用资源 = “平台:/resource/com.act21.mamba.model/model/expression.genmodel” 存在于工作流程中。
-
导入 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 (将#修改为@)