I do something similar using antform. You will need to obtain antform and
include it in your build libs as well as setting it up for use:
<!--
#######################################################################################################################################
antform adds the ability to interact with the user via forms.
#######################################################################################################################################
-->
<taskdef resource="com/sardak/antform/taskdefs.properties"
classpath="build/base/lib/antform.jar"/>
</project>
<target name="__get_svn_user">
<!--
#######################################################################################################################################
TARGET: __get_svn_user
Purpose: This target uses an antform to obtain the user's ID and password for
accessing subversion.
See: __init_diff, __validate_release, __retrieve_svn_info,
__retrieve_svn_update, __get_svn_target_url
#######################################################################################################################################
-->
<antform title="SVN properties">
<label>SVN login</label>
<textProperty label="User Name: " property="svnuser" required="true"
focus="true"/>
<textProperty label="Password: " property="svnpass" password="true"
required="true"/>
</antform>
</target>
I use the properties recovered later. The following is an example of the use:
<exec executable="${svn}" output="${release_dir}/svn_log_info.txt">
<arg value="--username"/>
<arg value="${svnuser}"/>
<arg value="--password"/>
<arg value="${svnpass}"/>
<arg value="log"/>
<arg value="--verbose"/>
<arg value="--revision"/>
<arg value="${release_start_rev}:${targetRevision}"/>
<arg value="${baseTargetURL}"/>
</exec>
Thank you,
Chuck Holzwarth
(804) 403-3478 (home)
(540) 335-3171 (cell)
----- Original Message ----
From: Chun Ji <[EMAIL PROTECTED]>
To: Ant Users List <[email protected]>
Sent: Wednesday, January 9, 2008 5:00:06 PM
Subject: an input for ant arg.
Hi all,
I have a file: "input.sql" which contans a line as:
"
...
where keyp_clientid in (7,32,113,33) --Second Wave
..
",
And I need this " (7, 32, 113, 33)" as an input string to excute a java
class, and that is command line I use on my linux box, and it works,
"
java Test `grep "^where keyp_clientid in" input.sql | awk '{print $4}'`
".
Now the question is how can I use this command line in an Ant Makefile
to get the same results? Here is what I did in my "build.xml" and it
fails:
"
...
<target name="migration">
<exec executable="java" dir=".">
<arg line="..."/>
<arg line="Test `grep "^where keyp_clientid in" input.sql |
awk '{print $4}'` "/>
</exec>
<xslt .../>
</target>
...
"
The error msg is: Element type "arg" must be followed by either
attribute specifications, ">" or "/>"
So what should I do to solve this issue ? Any comments is welcome!
thanks a lot,
Chun
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ