ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlcarpen...@household.com
Subject Absolute path from relative path within build file used in test
Date Wed, 07 Aug 2002 00:04:20 GMT

How do I determine an absolute path from a relative path within a build
file?

I am doing this within a unit test, so if there is something I should be
doing in my subclass of BuildFileTest please let me know.

<?xml version="1.0"?>

<project
     name="cvsgroupimporttask-test"
     basedir="../../../../../"
     default="init-repository">

     <property name="temp.dir" value="tmpdir" />

     <!--
     I am trying to create a temporary local CVS repository for test
purposes.
     The problem is that cvsRoot needs an absolute path and I only have a
relative one.
     -->
     <target name="init-repository">
          <mkdir dir="${temp.dir}"/>
          <cvs
               command="init"
               cvsRoot="${temp.dir}/cvsrepository"
               failonerror="true"/>
     </target>

     <target name="cleanup">
          <delete dir="${temp.dir}" />
     </target
</project>

James Lee Carpenter
Software Engineer
Household Technical Services
6602 Convoy Court
San Diego, CA 92111

ph: 858-609-2461
email: jlcarpenter@household.com



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message