Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Running Ecore2Java task without headless Eclipse
Running Ecore2Java task without headless Eclipse [message #532008] Thu, 06 May 2010 18:16 Go to next message
vatsan  is currently offline vatsan Friend
Messages: 2
Registered: May 2010
Junior Member
I'm trying to run the Ecore2Java task without using a headless Eclipse instance. Is this possible at all?

I tried defining a taskdef for the Ecore2Java task as follows

<taskdef name="emf.Ecore2Java" classname="org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask ">
<classpath>
<fileset dir="C:\eclipse\plugins" includes="*.jar" />
<fileset dir="C:\eclipse\ecore2java" includes="*.jar" />
</classpath>
</taskdef>

I had to extract out emf.ant.tasks.jar and importer.ecore.tasks.jar from the eclipse plugins jars and make it available on the classpath but my build fails with this message

java.lang.RuntimeException:
org.eclipse.emf.common.util.DiagnosticException: RuntimeException: Cannot creat
e a resource for 'file:/<path>/src/main/metamodel
/Workflow.genmodel'; a registered resource factory is needed


So I'm obviously missing something. I'm still playing with it but wanted to find out if it would be possible in the first place. Any pointers would be greatly appreciated.
Re: Running Ecore2Java task without headless Eclipse [message #532105 is a reply to message #532008] Fri, 07 May 2010 08:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Comments below.

vatsan wrote:
> I'm trying to run the Ecore2Java task without using a headless Eclipse
> instance. Is this possible at all?
I doubt it.
>
> I tried defining a taskdef for the Ecore2Java task as follows
>
> <taskdef name="emf.Ecore2Java"
> classname="org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask ">
> <classpath>
> <fileset dir="C:\eclipse\plugins" includes="*.jar" />
> <fileset dir="C:\eclipse\ecore2java" includes="*.jar" />
> </classpath>
> </taskdef>
>
> I had to extract out emf.ant.tasks.jar and importer.ecore.tasks.jar
> from the eclipse plugins jars and make it available on the classpath
> but my build fails with this message
>
> java.lang.RuntimeException:
> org.eclipse.emf.common.util.DiagnosticException: RuntimeException:
> Cannot creat
> e a resource for 'file:/<path>/src/main/metamodel
> /Workflow.genmodel'; a registered resource factory is needed
When you run without Eclipse all the global registrations normally done
via the plugin.xmls will need to be done manually.
>
>
> So I'm obviously missing something. I'm still playing with it but
> wanted to find out if it would be possible in the first place. Any
> pointers would be greatly appreciated.
I'm not sure it's possible in the end. Why is it necessary?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Running Ecore2Java task without headless Eclipse [message #532265 is a reply to message #532105] Fri, 07 May 2010 17:59 Go to previous messageGo to next message
vatsan  is currently offline vatsan Friend
Messages: 2
Registered: May 2010
Junior Member
Necessity - I'm trying to invoke Ecore2Java through my custom build system. If I call a headless Eclipse instance from my build I'm running into classloading issues between my build system and the Eclipse AntRunner. So I was trying to see if I can bypass a headless Eclipse instance.
Re: Running Ecore2Java task without headless Eclipse [message #908777 is a reply to message #532008] Thu, 06 September 2012 01:31 Go to previous message
Jim Foscue is currently offline Jim FoscueFriend
Messages: 15
Registered: June 2012
Junior Member
Did you ever get an answer to this?
Previous Topic:getOldValue call on Notification from validationOccurred returns null
Next Topic:Generating ecore model code with maven or ant
Goto Forum:
  


Current Time: Wed Apr 24 17:47:24 GMT 2024

Powered by FUDForum. Page generated in 0.02921 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top