|
|
|
|
|
|
|
|
Re: Using Ecore2Java ant task [message #665042 is a reply to message #426927] |
Wed, 13 April 2011 03:02 |
Daniel Ford Messages: 148 Registered: July 2009 Location: New York |
Senior Member |
|
|
Having just run into exactly the same problem, but not really seeing the
solution here, I worked through an existing working example and was able
to duplicate the problem on the working example. It seems that if you
have a typo in the name of the ecore file (such that it can't be found,
I suspect) then you'll get the "MalformedURLException" with the
mysterious message "unknown protocol : d" (or "c" in my case).
I suspect Achilleas corrected the name, but didn't realize that that was
the problem.
Dan
On 1/26/2009 10:26 AM, Achilleas wrote:
> Hi,
>
> I am trying to use the Ecore2Java ant task to generate the
> model,edit,editor projects programmatically.
>
> I have written the following Ant script:
>
> <project name="C Generation" default="all" basedir=".">
>
> <property name="model.file"
> value="./bt.com.cpemss.plugin/model/fin.ecore"/>
> <property name="genmodel.file"
> value="./bt.com.cpemss.plugin/model/fin.genmodel"/>
>
> <taskdef name="emfGen"
> classname="org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask "/>
>
> <target name="genJava">
> <echo message="java generation from ecore model"/>
> <emf.Ecore2Java model="${model.file}"
> genModel="${genmodel.file}"
> modelProject="bt.com.cpemss.plugin"
> reconcileGenModel="keep"
> generateJavaCode="true"
> generateModelProject="true"
> generateEditProject="true"
> generateEditorProject="true"
> modelPluginID="bt.com.cpemss.plugin"
> modelProjectFragmentPath="src">
> </emf.Ecore2Java>
> </target>
>
> <target name="all" depends="genJava">
> </target>
>
> </project>
>
> The exception message I am getting when running it from eclipse is the
> following:
>
>
> Buildfile:
> D:\Borland\Together\2007\eclipse\workspace\bt.com.cpemss.plu gin\build.xml
>
> genJava:
> [echo] java generation from ecore model
>
> BUILD FAILED
> D:\Borland\Together\2007\eclipse\workspace\bt.com.cpemss.plu gin\build.xml:19:
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
> java.net.MalformedURLException: unknown protocol: d
>
> Total time: 297 milliseconds
>
>
> I have searched the newsgroup and google up to find what is that message
> but no luck. Is there anyone that can help on this?
>
> Thanks,
>
> Achilleas
>
|
|
|
Powered by
FUDForum. Page generated in 0.03762 seconds