0

In my project i am executing the acceleo project from eclipse by using the plugin. I have generate.mtl and generate.java. The execution is done by using the run as configuration and choosing the acceleo application. THis configuration takes as an input the generate.java as a main class and as a model takes an uml file. It gives as an output some atl files.

Everything works perfect, the files is executed and the output is produced. I am trying now to automate this process by using MAVEN. Could someone please give me some hints how to do that? Even the basic ones since am new with MAVEN. How can i execute the mtl file with same parameters as described above?

Thank you in advance!

user1495959
  • 43
  • 1
  • 5

2 Answers2

0

The Java class generated for your main module has an entry point (public static void main(String[])) that can be called from maven like this: http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/

You just need to give as the arguments the path of your model, your output folder and if necessary some additional arguments.

user229044
  • 232,980
  • 40
  • 330
  • 338
sbegaudeau
  • 1,504
  • 13
  • 18
  • Hi Stephane, tank you for your hints. I tried based on the sample you send me. But now i am having another problem. While i execute package goal it gives me an error which says that it can not find the generate.emtl file in a specific path. The problem is that i copied the generate.emtl(the one generated while i execute with eclipse) in the required path but still it says me that it can not find the file in that path. Although the file is there. – user1495959 Jul 08 '12 at 11:27
0

I was working on this topic last days and come up to a solution explained here : http://lbroudoux.wordpress.com/2012/07/24/launching-acceleo-generation-from-maven. Let me know if it helps you.

Regards,

Laurent

lbroudoux
  • 101
  • 6
  • Rather than linking to a blog, can you provide an excerpt here with the relevant details? SO doesn't typically encourage answers which are only links to external sites. – Peter Mularien Feb 11 '13 at 20:20
  • Here is the link to the sample project : https://github.com/lbroudoux/acceleo-maven-sample – lbroudoux May 28 '14 at 07:01