|
Re: Running an ant file from Java to execute some ATL transformations [message #67652 is a reply to message #67626] |
Thu, 29 November 2007 16:07 |
Eclipse User |
|
|
|
Originally posted by: freddy.allilaire.univ-nantes.fr
Hi Bea,
Maybe you should take a look to "org.eclipse.ant.core.AntRunner" java
class. I think it will be more adapted to your use case.
HTH
Regards,
Freddy.
Bea a écrit :
> Hello everybody,
> I don't know if this newsgroup is the correct place to post my problem, but
> I will try.
> I have an ANT script (build.xml) that executes several ATL transformations.
> I want to run that build.xml file from java because I would like to create
> an Eclipse plug-in which executes some ATL transformations. The problem is
> tht I don't know how to do that. I have tried with:
>
> Process proce = Runtime.getRuntime().exec("cmd /c
> "+ant_home+"/bin/ant -buildfile
> c:/eclipse3.3/runtime-New_configuration/Plugin/src/plugin/po pup/actions/build.xml ");
>
>
>
>
> InputStream is = proce.getInputStream();
>
> BufferedReader br = new BufferedReader (new InputStreamReader (is));
>
>
> String aux = br.readLine();
> while (aux!=null)
> {
> aux = br.readLine();
> }
> }catch(Exception e){
> System.out.println("Error: "+e.getMessage());
> }
>
> The problem is that only the first sentence in the ANT file is executed, but
> not all the script. Why?
>
> Any idea?
>
> Thank you very much in advance
>
> Bea
>
>
--
Freddy Allilaire - ATLAS Group (INRIA & LINA)
http://www.sciences.univ-nantes.fr/lina/atl/contrib/allilair e
|
|
|
Powered by
FUDForum. Page generated in 0.04367 seconds