ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: "ant -n", How to display tasks and args WITHOUT executing them
Date Fri, 07 Nov 2003 00:26:52 GMT
But what about setting properties that later affect which targets get  
run or which ${config}.properties are loaded, etc?    How does Antelope  
handle these situations?

simple make files just use filesystem date stamps for dependencies and  
have a very clear execution path.  How does 'make -n' handle situations  
where conditions could be set and later checked to affect what happens?

	Erik

On Thursday, November 6, 2003, at 01:01  PM, Dale Anson wrote:

> You might want to look at Antelope (http://antelope.sourceforge.net).  
> It has a 'trace' mode that does what you're looking for, that is, it  
> shows what would happen without it actually happening. Below is an  
> example output for a plugin that I'm working on for jEdit.
>
> As Stefan mentioned, this is not simple. This works pretty well with  
> Ant 1.5.x, not so well with Ant 1.6, so your mileage may vary.
>
>
> Tracing target: plugin
>
> Legend: <target>[task]
>
>
>
> <plugin>
>
> <init>[fail unless="jedit.install.dir" message="Please set  
> jedit.install.dir property."]
>
> <init>[mkdir dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\src"]
>
> <init>[mkdir dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\classes"]
>
> <init>[mkdir dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\docs"]
>
> <init>[mkdir dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\config"]
>
> <init>[mkdir dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\dist"]
>
> <init>[fail unless="jedit.install.dir" message="Please set  
> jedit.install.dir property."]
>
> <init>[mkdir dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\src"]
>
> <init>[mkdir dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\classes"]
>
> <init>[mkdir dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\docs"]
>
> <init>[mkdir dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\config"]
>
> <init>[mkdir dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\dist"]
>
> <compile>[echo]
>
> <compile>[javac deprecation="on" debug="on" nowarn="on"  
> destdir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\classes"  
> srcdir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\src"]
>
> <prep_files>[echo]
>
> <prep_files>[delete]
>
> <prep_files>[copy todir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\config"]
>
> <prep_files>[copy todir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\docs" overwrite="yes"]
>
> <prep_files>[replace dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\config"  
> token="@@build.num@@" value="1.0.1"]
>
> <prep_files>[replace dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\docs"  
> token="@@build.num@@" value="1.0.1"]
>
> <prep_files>[tstamp]
>
> <prep_files>[replace dir="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\docs" token="@@tstamp@@"  
> value="${TODAY}"]
>
> <plugin>[echo]
>
> <plugin>[tstamp]
>
> <plugin>[jar jarfile="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\dist/ 
> NavigatorPlugin.jar"]
>
> <plugin>[copy file="C:\Documents and  
> Settings\danson\src\plugins\plugins\Navigator\dist/ 
> NavigatorPlugin.jar" todir="C:\Documents and  
> Settings\danson/.jedit/jars"]
>
> </plugin>
>
>
>
> Done tracing target: plugin
>
>
> Olivier Vierlinck wrote:
>
>> Yes -debug is really good... but tasks are executed!! So, - if  
>> something is wrong, it's to late!
>> - executing task might be time too consuming when one just wants to  
>> get the dependencies, not the job done
>> But anyway, I guess I don't have to convince you of the usefulnes of  
>> the "make -n"  ;-)
>> And about the extension of tasks, this can be a new method in the  
>> base Task class. We can not force someone to provide useful  
>> implementation, just ask for it!! Anyway, this would be a nice add-on  
>> but less important than the 'kernel' ant dependency graph mentionned  
>> above...
>> Anybody aware of similar suggestion sent to the dev's mailing list?
>> -----Original Message-----
>> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
>> Sent: Thursday, November 06, 2003 1:31 PM
>> To: user@ant.apache.org
>> Subject: RE: "ant -n", How to display tasks and args WITHOUT executing
>> them
>>> Yes, I understand this part!
>>> But I think it would already be very useful information to know that  
>>> Ant would start 'jar' with such and such args, from such place and  
>>> so on.
>>> After that, we could say that it's up to the user to know what is a  
>>> 'jar' task, what it does and when.
>> That would printed with '-debug' if Ant would use the jar tool.
>> But it uses a usual ZipOutputStream. And most of the available tasks
>> are implemented in java and are not simple wrappers for tools.
>>> (or a next step would be to be able to ask each specific ant task  
>>> not to do anything but just describe what it 'would' do. But this is  
>>> not part of the 'core' ant itself, but rather something to delegate  
>>> to every task class, probably through some common interface)
>> That would be possible, I think. But a lot of work. And should be  
>> require that from each task? I think <echo> is fine without that ...
>> Jan
>>> Thanks,
>>> Olivier
>>>
>>> -----Original Message-----
>>> From: Stefan Bodewig [mailto:bodewig@apache.org]
>>> Sent: Thursday, November 06, 2003 1:17 PM
>>> To: user@ant.apache.org
>>> Subject: Re: "ant -n", How to display tasks and args WITHOUT  
>>> executing
>>> them
>>>
>>>
>>> On Thu, 6 Nov 2003, Olivier Vierlinck <Olivier.Vierlinck@iba.be>
>>> wrote:
>>>
>>>
>>>> This is probably a simple and common question
>>>
>>> common, yes - simple, no.
>>>
>>>
>>>> Is there in Ant something similar to the "make -n" option,
>>>> displaying what Ant WOULD execute for a given target and
>>>> configuration, without actually executing it, ?
>>>
>>> No.
>>>
>>> The reason is that Ant doesn't know what it would do without actually
>>> doing it.  <jar> can't tell you which files it would add to a jar
>>> without javing <javac> compile them first and so on ...
>>>
>>> Stefan
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


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


Mime
View raw message