|
Re: EMF Ant tasks [message #629634 is a reply to message #629438] |
Wed, 29 September 2010 03:46 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Hallvard,
Comments below.
Hallvard Trætteberg wrote:
> Hi,
>
> I have a question about EMF's Ant tasks. I'm able to generate Java
> source code from simple genmodel, using the emf.Ecore2Java task. But I
> also need to generate from one referencing another. After looking at
> the ModelImporter code, I came up with the following:
>
> <project name="Ecore2Java Generation" default="GenerateScxmlxtJava"
> basedir="..">
> <property name="workspaces.location"
> value="/Users/hal/java/workspaces"/>
> <property name="scxmlxt.location"
> value="${workspaces.location}/wazaabi/no.hal.scxmlxt"/>
> <property name="model"
> value="${scxmlxt.location}/model/scxmlxt.ecore"/>
> <property name="genmodel"
> value="${scxmlxt.location}/model/scxmlxt.genmodel"/>
> <property name="mex.location"
> value="${workspaces.location}/wazaabi/no.hal.mex"/>
> <target name="GenerateScxmlxtJava">
> <echo message="Generate the scxmlxt model and edit Java code
> from the ecore model"/>
> <emf.Ecore2Java model="${model}" genModel="${genmodel}"
> reconcileGenModel="reload"
> generateJavaCode="true"
> generateModelProject="true"
> generateEditProject="false"
> generateEditorProject="false"
> modelProject="no.hal.scxmlxt"
> modelProjectFragmentPath="src"
> >
> <arg line="-editProject no.hal.scxmlxt.edit src"/>
> <arg line="-refGenModel
> file:${mex.location}/model/mex.genmodel
> platform:/plugin/no.hal.mex/model/mex.ecore"/>
> </emf.Ecore2Java>
> </target>
> </project>
>
> However, now I get the following message (in the console):
> java.net.UnknownServiceException: protocol doesn't support output
I imagine it's needed to write to platform:/plugin, which isn't
allowed. Most URL handlers throw exceptions with more detail...
>
> Without more specific info. about the actual URI, I don't where the
> problem can be. I've tried setting breakpoints in the code that
> handles the refGenModel option, but I'm not sure I can debug Ant
> scripts that way (at least the breakpoint isn't triggered).
I'm not sure how to debug ant scripts either... :-(
>
> Hallvard
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02946 seconds