Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Standalone generation
[Acceleo] Standalone generation [message #880046] Fri, 01 June 2012 10:34 Go to next message
Cyril Savary is currently offline Cyril Savary
Messages: 3
Registered: June 2012
Junior Member
I'm trying to call acceleo generation without eclipse.

I got the error "package with uri "*" not found" which I resolved by adding the following line in the registerPackages function :
resourceSet.getPackageRegistry().put("metamodel.ecore", EcorePackage.eINSTANCE);


where "metamodel.ecore" is my metamodel.


But then I have a new error :

"Class 'App' is not found or is Abstract (file :***/app.xmi)"

where 'App' is a class from my metamodel, the class from which I created my model 'app.xmi'.

I tried to add lines in the 'registerResourceFactories' function like :
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl());


But this doesn't change anything. Any idea ?

Thank you.

Re: [Acceleo] Standalone generation [message #885099 is a reply to message #880046] Tue, 12 June 2012 13:19 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane Begaudeau
Messages: 406
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

With your ecore model, you should have a genmodel and the generated Java code. In this Java code, you should have a subclass of EPackage. You need the following code:
resourceSet.getPackageRegistry().put(MySubClassOfEPAckage.NS_URI, MySubClassOfEPAckage.eINSTANCE);


The following code would help to load the code of your model (in the case of xmi models):
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl());



Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau & @acceleo
Google+: stephane.begaudeau & acceleo
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo



Re: [Acceleo] Standalone generation [message #892763 is a reply to message #885099] Fri, 29 June 2012 14:14 Go to previous messageGo to next message
Cyril Savary is currently offline Cyril Savary
Messages: 3
Registered: June 2012
Junior Member
Thanks for your response,

Why should I have a genmodel ? I don't use one with my ecore meta-model.

With my meta-model, I only create dynamic instances of it, this instances are xmi models.

Then I use these xmi models as input for acceleo generation. Now I'm trying to do the same thing in standalone, isn't it possible ?

[Updated on: Mon, 02 July 2012 11:58]

Report message to a moderator

Re: [Acceleo] Standalone generation [message #893180 is a reply to message #892763] Tue, 03 July 2012 06:24 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4045
Registered: July 2009
Senior Member
Hi

In the absence of a response from the Acceleo guys....

It should not be necessary to have a genmodel, and I think I do some
Acceleo transformations without one.

I found it almost impossible to do standalone transformations with
Acceleo version 3.1.3, 3.2.*, 3.3 prior to RC6.

Make sure you're either using 3.1.2 or earlier or the Juno 3.3 release.

Regards

Ed Willink


On 29/06/2012 15:14, Cyril Savary wrote:
> Thanks for yout response,
>
> Why should I have a genmodel ? I don't use one with my ecore model.
>
> With my metamodel, I only create dynamic instances of it, this
> instances are xmi models.
>
> Then I use these xmi models as input for acceleo generation. Now I'm
> trying to do the same thing in standalone, isn't it possible ?
Re: [Acceleo] Standalone generation [message #893784 is a reply to message #880046] Thu, 05 July 2012 13:55 Go to previous message
Marc Missing name is currently offline Marc Missing name
Messages: 38
Registered: March 2011
Member
I've been using acceleo in a standalone app for some time now, including 3.1 and 3.2 releases... It's "simply" a matter of chasing missing jars at runtime... Smile

[Updated on: Thu, 05 July 2012 13:55]

Report message to a moderator

Previous Topic:[Acceleo] Java services
Next Topic:org.eclipse.acceleo:maven:jar:3.2.1 not found
Goto Forum:
  


Current Time: Tue Sep 16 07:39:44 GMT 2014

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

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