ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@antbuild.com>
Subject Re: How to use the Ant task <input> within WSAD 5?
Date Wed, 06 Aug 2003 12:21:44 GMT
In antelope there is a graphical input task (I do not know how it is called
exactly) which pop ups a Swing frame. This might work better.
Cheers,
Antoine
----- Original Message -----
From: "Philippe Waltregny" <philippe.waltregny@nrb.be>
To: <user@ant.apache.org>
Sent: Wednesday, August 06, 2003 1:48 PM
Subject: How to use the Ant task <input> within WSAD 5?


> Hello,
>
> I would like to execute successfully the following Ant build file both
> from WSAD 5 and outside (Command Prompt). I've upgraded the Ant version
> from 1.4.1 to 1.5.1 within WSAD to support the Ant task <input>.
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <project
>       name="input"
>       default="init"
>       basedir=".">
>
>       <target name="init">
>             <!-- Display the Ant version -->
>             <echo message="Ant version = ${ant.version}" />
>             <!-- Enter something -->
>             <input
>                   message="Please enter something:"
>                   addproperty="user.input" />
>             <!-- Display the user's input -->
>             <echo message="user.input = ${user.input}" />
>       </target>
>
> </project>
>
>
> So far, I've different results :
>
> In WSAD 5
>
>                         parsing buildfile
> C:\Backup\WSAD5_Workspace1\workspace\AntJ2EE\xml\input.xml with URI =
> file:C:/Backup/WSAD5_Workspace1/workspace/AntJ2EE/xml/input.xml
> Project base dir set to:
> C:\Backup\WSAD5_Workspace1\workspace\AntJ2EE\xml
> Arguments: -verbose
> Build sequence for target `init' is [init]
> Complete build sequence is [init]
> Ant version = Ant version 1.5.1 compiled on October 2 2002
> Please enter something:
> Build exception:
> file:C:/Backup/WSAD5_Workspace1/workspace/AntJ2EE/xml/input.xml:13:
> Failed to read input from Console.
> Build exception:
> file:C:/Backup/WSAD5_Workspace1/workspace/AntJ2EE/xml/input.xml:13:
> Failed to read input from Console.
> file:C:/Backup/WSAD5_Workspace1/workspace/AntJ2EE/xml/input.xml:13:
> Failed to read input from Console.
>                 at
> org.apache.tools.ant.input.DefaultInputHandler.handleInput(DefaultInputH
> andler.java:94)
>                 at
> org.apache.tools.ant.taskdefs.Input.execute(Input.java:138)
>                 at org.apache.tools.ant.Task.perform(Task.java:319)
>                 at org.apache.tools.ant.Target.execute(Target.java:309)
>                 at
> org.apache.tools.ant.Target.performTasks(Target.java:336)
>                 at
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>                 at
> org.apache.tools.ant.Project.executeTargets(Project.java:1250)
>                 at
> org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunne
> r.java:262)
>                 at java.lang.reflect.Method.invoke(Native Method)
>                 at
> org.eclipse.ant.core.AntRunner.run(AntRunner.java:234)
>                 at
> org.eclipse.ui.externaltools.internal.core.AntFileRunner.execute(AntFile
> Runner.java:56)
>                 at
> org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.executeR
> unner(DefaultRunnerContext.java:428)
>                 at
> org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.run(Defa
> ultRunnerContext.java:479)
>                 at
> org.eclipse.ui.externaltools.internal.ui.AntLaunchWizard$1.run(AntLaunch
> Wizard.java:117)
>                 at
> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalCon
> text.java:98)
> --- Nested Exception ---
> java.io.IOException: The handle is invalid
>                 at java.io.FileInputStream.readBytes(Native Method)
>                 at
> java.io.FileInputStream.read(FileInputStream.java(Compiled Code))
>                 at
> java.io.BufferedInputStream.read1(BufferedInputStream.java(Compiled
> Code))
>                 at
> java.io.BufferedInputStream.read(BufferedInputStream.java(Compiled
> Code))
>                 at
> java.io.FilterInputStream.read(FilterInputStream.java(Compiled Code))
>                 at
> java.io.InputStreamReader.fill(InputStreamReader.java(Compiled Code))
>                 at
> java.io.InputStreamReader.read(InputStreamReader.java(Compiled Code))
>                 at
> java.io.BufferedReader.fill(BufferedReader.java(Compiled Code))
>                 at
> java.io.BufferedReader.readLine(BufferedReader.java(Compiled Code))
>                 at
> java.io.BufferedReader.readLine(BufferedReader.java:378)
>                 at
> org.apache.tools.ant.input.DefaultInputHandler.handleInput(DefaultInputH
> andler.java:91)
>                 at
> org.apache.tools.ant.taskdefs.Input.execute(Input.java:138)
>                 at org.apache.tools.ant.Task.perform(Task.java:319)
>                 at org.apache.tools.ant.Target.execute(Target.java:309)
>                 at
> org.apache.tools.ant.Target.performTasks(Target.java:336)
>                 at
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>                 at
> org.apache.tools.ant.Project.executeTargets(Project.java:1250)
>                 at
> org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunne
> r.java:262)
>                 at java.lang.reflect.Method.invoke(Native Method)
>                 at
> org.eclipse.ant.core.AntRunner.run(AntRunner.java:234)
>                 at
> org.eclipse.ui.externaltools.internal.core.AntFileRunner.execute(AntFile
> Runner.java:56)
>                 at
> org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.executeR
> unner(DefaultRunnerContext.java:428)
>                 at
> org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.run(Defa
> ultRunnerContext.java:479)
>                 at
> org.eclipse.ui.externaltools.internal.ui.AntLaunchWizard$1.run(AntLaunch
> Wizard.java:117)
>                 at
> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalCon
> text.java:98)
> Build exception:
> file:C:/Backup/WSAD5_Workspace1/workspace/AntJ2EE/xml/input.xml:13:
> Failed to read input from Console.
>
>             In a Command Prompt
>
>             C:\Backup\WSAD5_Workspace1\workspace\AntJ2EE\xml>ant -f
> input.xml
> Buildfile: input.xml
>
> init:
>      [echo] Ant version = Apache Ant version 1.5.1 compiled on October 2
> 2002
>     [input] Please enter something:
> aaaa
>      [echo] user.input = aaaa
>
> BUILD SUCCESSFUL
> Total time: 2 seconds
> C:\Backup\WSAD5_Workspace1\workspace\AntJ2EE\xml>
>
> How to allow the <input> usage with WSAD 5 ?
>
> Greetings.
>
>
> Philippe Waltregny
>  mailto:philippe.waltregny@nrb.be
>
>



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


Mime
View raw message