ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Holzwarth <chuck_holzwa...@yahoo.com>
Subject Re: an input for ant arg.
Date Thu, 10 Jan 2008 13:29:06 GMT
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 <CJi@pro-unlimited.com>
To: Ant Users List <user@ant.apache.org>
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org







      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message