ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willers, Dominik" <Dominik.Will...@airbus.com>
Subject Indent-Task
Date Tue, 14 Oct 2003 15:14:15 GMT
Hello,

i haven't found any task to batch-indent the source-files of my
java-project. is that right, and if so, is there another solution to do
this with ant? i thought about calling emacs on command-line...

Thank you
Dominik

> -----Original Message-----
> From: peter reilly [mailto:peter.reilly@corvil.com]
> Sent: Tuesday, October 14, 2003 5:05 PM
> To: Ant Users List
> Subject: Re: Nested Tasks
> 
> 
> On Tuesday 14 October 2003 15:38, peter reilly wrote:
> > It does in ant 1.6.
> > In ant 1.5 it does not as the task
> > would have already been resolved.
> >
> > If execute is not used in ant 1.6 I get
> 
> Opps that should if execute is used..
> 
> > the error you are getting:
> >  Could not create task of type: task2
> >
> > Just make sure that you are not running ant 1.6.
> >
> > Peter
> 
> I have used the class you posted in package task with a build build as
> follows:
> 
> <project default="c">
>   <target name="c">
>     <mkdir dir="classes"/>
>     <javac srcdir="src" destdir="classes"/>
>     <taskdef name="task1" classname="task.Task1"
>              classpath="classes"/>
>     <taskdef name="task2" classname="task.Task2"
>              classpath="classes"/>
> 
>     <task1/>
>     <task2/>
>     <task1>
>       <task2/>
>     </task1>
>   </target>
> </project>
> 
> and task2 defined as:
> package task;
> 
> import org.apache.tools.ant.Task;
> 
> public class Task2 extends Task {
>     public void execute() {
>         System.out.println("Hello world");
>     }
> }
> 
> This works fine for ant 1.5.4 but fails with ant 1.6.
> 
> Peter
> >
> > On Tuesday 14 October 2003 15:31, Bender, Christopher wrote:
> > > ok but that doesnt help ant find the task.
> > > but thanks for that, i remember reading to call perform somewhere.
> > >
> > > -----Original Message-----
> > > From: peter reilly [mailto:peter.reilly@corvil.com]
> > > Sent: Tuesday, October 14, 2003 10:28 AM
> > > To: Ant Users List
> > > Subject: Re: Nested Tasks
> > >
> > > On Tuesday 14 October 2003 15:15, Bender, Christopher wrote:
> > > > 	private void executeChildren() {
> > > > 		Iterator taskItr = tasks.iterator();
> > > > 		while (taskItr.hasNext()) {
> > > > 			((Task)taskItr.next()).execute();
> > > > 		}
> > >
> > > You need to do ((Task)taskItr.next()).perform() and not
> > > execute.
> > >
> > > Peter
> > >
> > > 
> ---------------------------------------------------------------------
> > > 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
> 
> 
> This mail has originated outside your organization,
> either from an external partner or the Global Internet. 
> Keep this in mind if you answer this message.
> 

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


Mime
View raw message