Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Using emftext in maven & tycho?

I don't run EMF generation via Tycho, but the error message suggests that your task in undefined. Google tells me that this task is defined in org.emftext.sdk.ant bundle, which is apparently not on antrunner's classpath. Furthermore, a bit more googling reveals the following page, which may explain why this bundle is not on the classpath: http://stackoverflow.com/questions/8693937/how-can-i-start-the-generation-in-emftext-via-ant.

BR/Mikhail

Kind regards,
Mikhail Kalkov


On Thu, Feb 20, 2014 at 9:24 AM, Huijsmans, Martien <martien.huijsmans@xxxxxxxxx> wrote:

Hi all,

 

I am using maven & tycho to automate the build of a set of eclipse plugin’s.

 

I have an Eclipse plugin that contains ecore and emftext based models.

The project contains an ant script (genmodel.generate.sources.xml). The script is at the end of the email.

The script works fine when started from within Eclipse.

 

In the pom.xml for the project I use
tycho-eclipserun-plugin + <appArgLine>-application org.eclipse.ant.core.antRunner ….. </ appArgLine>

To generate the code.

The generation works fine for the ecore model using the emf.Ecore2Java task.

 

But for emftext models it fails with the following error:

     C:\mahuGitRepo\generate_model_test\plugins\test.simulink\genmodel.generate.sources.xml:25:

                      Problem: failed to create task or type emftext.GenerateTextResource

    Cause: The name is undefined.

    Action: Check the spelling.

    Action: Check that any custom tasks/types have been declared.

    Action: Check that any <presetdef>/<macrodef> declarations have taken place.

 

1)      Any suggestions / hint how to solve this problem?
Using Tycho is not a must for me, but it is a logical choice because of the re-use of the ant-scripts.
A long google session sofar didn’t give me the

2)      Or better, does somebody know of a working example where emftext is integrated into maven?

 

Regards Martien

 

<?xml version="1.0"?>

<project name="project" default="genmodel.generate.sources">

                <property name="pluginID" value="test.simulink"/>

                <property name="simulinkLanguage" value="Simulink"/>

 

    <target name="genmodel.generate.sources">

                <emf.Ecore2Java

                                   model="model/${simulinkLanguage}.ecore"

                                   genModel="model/${simulinkLanguage}.genmodel"

                                   modelProject="${pluginID}"

                                   reconcileGenModel="keep"

                                   generateModelProject="true"

                                   generateEditProject="true"

                                   generateEditorProject="true"

                                   modelPluginID="${pluginID}"

                                   modelProjectFragmentPath="src"

                                   validateModel="true">

                </emf.Ecore2Java>

               

              <emftext.GenerateTextResource

                        syntax="model/${simulinkLanguage}.cs"

                        rootFolder="../"

                        syntaxProjectName="test.simulink.resource.simulink"

                    />

    </target>

</project>


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top