You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ld...@microcelli5.com on 2002/01/25 13:39:51 UTC
Dumb question: equivalent of make -n?
HI,
I want to verify a new ant task before running it. Can I do the equivalent
af a make -n where all the commands that will be executed are printed out
but no action is actually taken?
Thanks,
L
--
Laurent Duperval <ma...@microcelli5.com>
Qu'est-ce que je cause bien tout de même!
-Léonard le génie
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Dumb question: equivalent of make -n?
Posted by Peter Donald <pe...@apache.org>.
On Fri, 25 Jan 2002 23:39, lduperval@microcelli5.com wrote:
> HI,
>
> I want to verify a new ant task before running it. Can I do the equivalent
> af a make -n where all the commands that will be executed are printed out
> but no action is actually taken?
Not at this point in time. You will be able to doso in the future but not now
;(
--
Cheers,
Pete
----------------------------------------------------------------
Fools ignore complexity. Pragmatists suffer it.
Some can avoid it. Geniuses remove it.
-- Perlis's Programming Proverb #58, SIGPLAN Notices, Sept. 1982
----------------------------------------------------------------
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Dumb question: equivalent of make -n?
Posted by ld...@microcelli5.com.
On 25 Jan, Erik Hatcher wrote:
> This is what JUnit is for! :)
>
> Write some test cases to ensure that your tasks are behaving as expected.
> Ant's codebase has infrastructure I encourage you to investigate and perhaps
> borrow for your own custom tasks.
>
No, no, it's not for a custom task. It's for a target. I probably got my
terms mixed up. But as Peter said, it's just not there yet.
For custom tasks, I agree that you should use JUnit.
L
--
Laurent Duperval <ma...@microcelli5.com>
Le petit démon joufflu de la gastronomie frétille en moi!
-Achille Talon
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Dumb question: equivalent of make -n?
Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
This is what JUnit is for! :)
Write some test cases to ensure that your tasks are behaving as expected.
Ant's codebase has infrastructure I encourage you to investigate and perhaps
borrow for your own custom tasks.
You could workaround by having some conditional targets that depended on
targets that output key properties, and just run once without setting the
property, and then again after you've verified things are set as you desire
with the conditional property set.
Erik
----- Original Message -----
From: <ld...@microcelli5.com>
To: <an...@jakarta.apache.org>
Sent: Friday, January 25, 2002 9:58 AM
Subject: Re: Dumb question: equivalent of make -n?
> On 25 Jan, Erik Hatcher wrote:
> > No, Ant has no such option. This would be difficult given Ant's
> > differences with make - make handles the dependency checking itself,
> > whereas Ant's tasks handle it.
> >
> > What exactly do you want to "verify" about a new task?
> >
>
> That I've written it correctly and that the operations that will take
place
> are really those I expect. It's more to verify that I'm correct rather
than
> that ant is correct. This is more important to me when I'm writing a
> destructive task (a task that can change data in a database, that deletes
or
> renames files, stuff like that).
>
> For example, I've had at least one instance where my .ant.properties file
> contained the incorrect schema for a test I was doing and I modified the
> wrond data. It wasn't a critical error but it coulda been.
>
> L
>
> --
> Laurent Duperval <ma...@microcelli5.com>
>
> "I realized that the purpose of writing is to inflate ideas, obscure poor
> reasoning, and inhibit clarity."
> -Calvin
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Dumb question: equivalent of make -n?
Posted by ld...@microcelli5.com.
On 25 Jan, Erik Hatcher wrote:
> No, Ant has no such option. This would be difficult given Ant's
> differences with make - make handles the dependency checking itself,
> whereas Ant's tasks handle it.
>
> What exactly do you want to "verify" about a new task?
>
That I've written it correctly and that the operations that will take place
are really those I expect. It's more to verify that I'm correct rather than
that ant is correct. This is more important to me when I'm writing a
destructive task (a task that can change data in a database, that deletes or
renames files, stuff like that).
For example, I've had at least one instance where my .ant.properties file
contained the incorrect schema for a test I was doing and I modified the
wrond data. It wasn't a critical error but it coulda been.
L
--
Laurent Duperval <ma...@microcelli5.com>
"I realized that the purpose of writing is to inflate ideas, obscure poor
reasoning, and inhibit clarity."
-Calvin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Dumb question: equivalent of make -n?
Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
No, Ant has no such option. This would be difficult given Ant's differences
with make - make handles the dependency checking itself, whereas Ant's tasks
handle it.
What exactly do you want to "verify" about a new task?
Erik
----- Original Message -----
From: <ld...@microcelli5.com>
To: "Ant Users mailing List" <an...@jakarta.apache.org>
Sent: Friday, January 25, 2002 7:39 AM
Subject: Dumb question: equivalent of make -n?
HI,
I want to verify a new ant task before running it. Can I do the equivalent
af a make -n where all the commands that will be executed are printed out
but no action is actually taken?
Thanks,
L
--
Laurent Duperval <ma...@microcelli5.com>
Qu'est-ce que je cause bien tout de même!
-Léonard le génie
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>