ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rosenberg" <ja...@squaretrade.com>
Subject Re: Difference between file and resource in property task
Date Wed, 29 Nov 2000 15:22:18 GMT
Stefan,

Here's a sample project file:

<?xml version="1.0"?>
<project name="utilities" default="test" basedir=".">
 <property resource="test.properties"/>

 <target name="test">
  <cvs cvsRoot="${CVSROOT}" command="-q update" />
 </target>
</project>

Here's test.properties (in the current directory, which is in the CLASSPATH):

CVSROOT=fred

Here's the -verbose output:

*******************

D:\WorkRoot\event_plugins\utilities>ant -verbose -buildfile temp.xml
Ant version 1.2 compiled on October 24 2000

Buildfile: temp.xml
Detected Java Version: 1.3
Detected OS: Windows NT
Project base dir set to: D:\WorkRoot\event_plugins\utilities
 [property] Resource Loading test.properties
Build sequence for target `test' is [test]
Complete build sequence is [test]
      [cvs] cvs [update aborted]: CVSROOT ${CVSROOT} must be an absolute pathname

BUILD SUCCESSFUL

Total time: 1 second

******************

Notice that it fails to dereference the CVSROOT property.  If I change the "resource" to "file",
it works fine:

*******************
D:\WorkRoot\event_plugins\utilities>ant -verbose -buildfile temp.xml
Ant version 1.2 compiled on October 24 2000

Buildfile: temp.xml
Detected Java Version: 1.3
Detected OS: Windows NT
Project base dir set to: D:\WorkRoot\event_plugins\utilities
 [property] Loading D:\WorkRoot\event_plugins\utilities\test.properties
Build sequence for target `test' is [test]
Complete build sequence is [test]
      [cvs] cvs [update aborted]: CVSROOT fred must be an absolute pathname

BUILD SUCCESSFUL

Total time: 1 second

****************

Jason

Mime
View raw message