You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Hardacker, Andrew" <An...@Compuware.com> on 2005/08/01 16:21:17 UTC

RE: Calling ANT from a Servlet

When a method is flagged as deprecated, the Javadoc should specify the new,
preferred method, so that's always the best place to look for a solution. In
this case the Javadoc recommends using the non-static method "parse".

Something like this I'd imagine (completely untested):

ProjectHelper ph = ProjectHelper.getProjectHelper();
ph.parse(project, file); 

Andy Hardacker

-----Original Message-----
From: KrustyDerClown [mailto:KrustyDerClown@gmx.de]
Sent: Saturday, July 30, 2005 6:36 PM
To: Ant Users List
Cc: Andrew.Hardacker@Compuware.com
Subject: Re: Calling ANT from a Servlet


Hello,

thanks for the article. It works very fine, but i have one question. Maybe 
anybody know an answer.

The Project Configuration works with the following command in my servlet:

    ProjectHelper.configureProject(project, buildFile);

I get the Warning in Eclipse:

    The method configureProject(Project, File) from the type ProjectHelper 
is deprecated

Anybody know a workaround for me to get the warning out ?

Thank you for answers.

Greets Oliver

----- Original Message ----- 
From: "Hardacker, Andrew" <An...@Compuware.com>
To: "'Ant Users List'" <us...@ant.apache.org>
Sent: Wednesday, July 27, 2005 7:20 PM
Subject: RE: Calling ANT from a Servlet


> Yes, it's possible, and not particularly difficult. This article is a good
> place to start.
>
> http://www.onjava.com/pub/a/onjava/2002/07/24/antauto.html?page=1
>
> Andy Hardacker
>
> -----Original Message-----
> From: KrustyDerClown [mailto:KrustyDerClown@gmx.de]
> Sent: Wednesday, July 27, 2005 12:15 PM
> To: user@ant.apache.org
> Subject: Calling ANT from a Servlet
>
>
> Hello,
>
> situation: I want use ANT from a Java WebApplication. I have a ANT build
> file with some targets and tasks. (cvs task, cvschangelog task, xslt task)
> und want run this build file within a servlet, because the user can give 2
> dates from a JSP as input for the cvschangelog task.
>
> Is this possible in generell ? Is that difficult ?
>
> Can anyone mabye provide some example how the call must be defined in my
> Servlet ? Or a good website with a example.
>
> You think i have other options for my plan ?
>
> Thank you for your support.
>
> Greets Oliver
>
>
>
> The contents of this e-mail are intended for the named addressee only. It
> contains information that may be confidential. Unless you are the named
> addressee or an authorized designee, you may not copy or use it, or 
> disclose
> it to anyone else. If you received it in error please notify us 
> immediately
> and then destroy it.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
> 



The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org