Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Create Standalone application
[Acceleo] Create Standalone application [message #909092] Thu, 06 September 2012 14:18 Go to next message
Luke Mising name is currently offline Luke Mising nameFriend
Messages: 7
Registered: October 2010
Junior Member
Hi,

I'm trying to create a standalone application with acceleo. When running acceleo in eclipse everything works fine. But as soon as I try to export my project as a "runnable jar" file the applications crashes with the well known error ".emtl" not found. It seems that the export command does not pack the .emtl-files inside the jar??

However, now I'm trying to create my jar file with an ant-script. This seems to work fine. I just need to overwrite the method
 @Override
    protected URI createTemplateURI(String entry) {    	
    	return URI.createURI(URI.decode(entry));
    }
to tell acceleo to load the .emtl-files from inside the jar file. The execution fails with the error message "org.eclipse.acceleo.engine.AcceleoEvaluationException: Error while resolving module dependencies". Okay. Fine. Acceleo doesn't seem to like One-Jar-Applications. So my quenstion is: What is the best way to deploy an acceleo code generator as a standalone application?
Re: [Acceleo] Create Standalone application [message #909114 is a reply to message #909092] Thu, 06 September 2012 15:08 Go to previous message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

You shouldn't have to do anything special, if you look at this test of ours, you should find everything you need: https://github.com/eclipse/acceleo/tree/master/tests/org.eclipse.acceleo.standalone.generators.tests
We have a stand alone generator in the "generators" folder, the dependencies in the "lib" folder and we launch it with this class: https://github.com/eclipse/acceleo/blob/master/tests/org.eclipse.acceleo.standalone.generators.tests/src/org/eclipse/acceleo/standalone/generators/tests/GeneratorsTest.java

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau & @acceleo
Google+: stephane.begaudeau & acceleo
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo
Previous Topic:migrating from acceleo2 to acceleo 3
Next Topic:[Xtend]Allow user to add code in generated source
Goto Forum:
  


Current Time: Fri Apr 19 05:43:36 GMT 2024

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

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

Back to the top