ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: CVS Task + add command
Date Thu, 28 Mar 2002 16:11:12 GMT
Had the same issue to do a cvs checkout!!! Resorted to using <exec> as well.
(using ANT 1.4.1 on W2K).

For those interested, here are 3 targets that do a cvs update or checkout of
a known module from a know repository to a predefined location. Just uses
the result of a condition to do either a cvs update or a cvs checkout, with
the cvs checkout using <exec> since also needs to execute from another
directory than ${basedir}.

Hope someone fins this useful. --DD

       Find out if this machine has OpenWorks Lite installed
  <target name="has.owlite?"
          description="Find out if this machine has OpenWorks Lite

    <condition property="has.owlite">
      <available file="${env.OWLITE_HOME}/OpenWorks/bin/owdevkitv.dll"
                 type="file" />

    <!-- All this to print "true" or "false" for the property value -->
    <condition property="has.owlite.value"
      <equals arg1="${has.owlite}"
              arg2="$${has.owlite}" />

    <property name="has.owlite.value"
              value="true" />

    <echo message="has.owlite  = ${has.owlite.value}" />
    <echo message="OWLITE_HOME = ${env.OWLITE_HOME}" />

  </target><!-- has.owlite? -->

  <!-- ====================================================
       Updates OpenWorks Lite from CVS
  <target name="owlite.update"
          depends="has.owlite?, owlite.checkout"
          description="Updates OpenWorks Lite from CVS">

    <echo message="Updating OpenWorks Lite..." />
    <cvs command="-z3 update -d -P"
         quiet="${cvs-quiet}" />

  </target><!-- owlite.update -->

  <target name="owlite.checkout"
          description="Checks Out OpenWorks Lite from CVS">

    <echo message="Checking Out OpenWorks Lite..." />
    <exec executable="cvs.exe"
      <arg line="-z3 -d ${mowi.cvsroot} checkout owlite" />

  </target><!-- owlite.checkout -->

 -----Original Message-----
From: 	Mike Lecza [] 
Sent:	Thursday, March 28, 2002 8:25 AM
Subject:	CVS Task + add command

Is there any way to tell the CVS task where to execute from?  I can only
do a CVS add with the exec Task because when I try to use the cvs task I
cannot specify the location to execute from.  The cvs add command must
be fired from the location where the file exists (as far as I can tell).

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message