Ant构建器构建失败eINSTANCE [英] Ant Builder Build Failed eINSTANCE

查看:172
本文介绍了Ant构建器构建失败eINSTANCE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用AcceleoCompiler一个Ant生成器。当我用Ant构建我得到以下错误:

 编译:
[acceleoCompiler] eINSTANCE构建失败
C:\\用户\\随机\\工作区\\富\\酒吧\\框架\\ buildstandalone.xml:52:eINSTANCE

下面是如何我有我的目标定义,这可能是重要的其他一些信息。我很新的蚂蚁和acceleo。让我知道是否有你需要的任何其他信息。我不知道任何的下面是正确的,让我知道如果有什么我需要改变。它是在抱怨该生产线是 packagesToRegister =org.eclipse.acceleo.parser.compiler.AcceleoCompiler> 我不知道,如果该行是正确可言,我只是猜测。

 <路径ID =Framework.classpath>
    <路径REFID =Framework.libraryclasspath/>
< /路径><的taskdef ID =acceleoCompilerNAME =acceleoCompiler类名=org.eclipse.acceleo.parser.compiler.AcceleoCompiler
         classpathref =Framework.libraryclasspath>
< /&的taskdef GT;<目标名称=编译>
< acceleoCompiler sourceFolder =$ {} SOURCE_FOLDER
                 outputFolder =$ {} OUTPUT_FOLDER
                 依赖=
                 binaryResource =真
                 packagesToRegister =org.eclipse.acceleo.parser.compiler.AcceleoCompiler>< / acceleoCompiler>
< /目标与GT;


解决方案

packagesToRegister 是包的元模型例如一个参考,如果您的发电机使用UML元模型,要注册包装org.eclipse.uml.uml2.UMLPackage(或类似的东西),你可以看到在方法注册所需的包装 registerPackage 的Java启动类的发电机。该AcceleoCompiler是不注册(这就是为什么在AcceleoCompiler未找到变量eINSTANCE)包。如果你已经生成了自己的元模型的code,你应该寻找EMF生成一个** Package类。

Trying to use AcceleoCompiler with an Ant Builder. When i build with ant i get the following error:

compile:
[acceleoCompiler] eINSTANCE

BUILD FAILED
C:\Users\random\workspace\foo\bar\Framework\buildstandalone.xml:52: eINSTANCE

Here is how i have my target defined and some other information that could be important. I am very new to ant and acceleo. Let me know if there is any other information you need. I am not sure that any of the below is correct, let me know if there is anything i need to change. The line that it is complaining about is packagesToRegister="org.eclipse.acceleo.parser.compiler.AcceleoCompiler"> I do not know if that line is correct at all, i was just guessing.

<path id="Framework.classpath">
    <path refid="Framework.libraryclasspath"/>
</path>

<taskdef id="acceleoCompiler" name="acceleoCompiler" classname="org.eclipse.acceleo.parser.compiler.AcceleoCompiler"
         classpathref="Framework.libraryclasspath">
</taskdef>

<target name="compile">
<acceleoCompiler sourceFolder="${SOURCE_FOLDER}"
                 outputFolder="${OUTPUT_FOLDER}"
                 dependencies=""
                 binaryResource="true"
                 packagesToRegister="org.eclipse.acceleo.parser.compiler.AcceleoCompiler"></acceleoCompiler>
</target>

解决方案

The line packagesToRegister is a reference to the package of your metamodel for example, if your generator is using the UML metamodel, you should register the package org.eclipse.uml.uml2.UMLPackage (or something like that), you can see the package needed to register in the method registerPackage of the Java launcher class of your generator. The AcceleoCompiler is not a package to register (that's why the variable eINSTANCE is not found on AcceleoCompiler). If you have generated the code of your own metamodel, you should look for a **Package class generated by EMF.

这篇关于Ant构建器构建失败eINSTANCE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆