You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Z W <mp...@gmail.com> on 2008/03/15 08:41:25 UTC

property undefined question

Hi

I can't figure out why the directory property isn't passed to another target
? It is defined.
Appreciate any help


<property file="im.properties"/>

Inside properties file I have

latestTPSDir=MMDDYYYYHHMM

previousTPSDir=MMDDYYYYHHMM

latestTPSDir2=MMDDYYYYHHMM

previousTPSDir2=MMDDYYYYHHMM



In report_main.xml

<target name="create_xsl">

<echo> LG directory being processed by xslt is
${lg_COMPLETED_RUN_DATA_REPOSITORY}\${latestTPSDir}\ </echo>

<echo> XSL location ${XSL_REPORTING_DIR} </echo>

<echo> LATEST location ${latestTPSDir} </echo>

<echo> PREVIOUS location ${previousTPSDir} </echo>

<ac:var name="latestTPSDir2" unset="true" />

<ac:propertycopy name="latestTPSDir2" from="
${lg_COMPLETED_RUN_DATA_REPOSITORY}\${latestTPSDir}" />     <----- line 31

<ac:propertycopy name="previousTPSDir2" from="
${lg_COMPLETED_RUN_DATA_REPOSITORY}\${previousTPSDir}" />

:

:

</target>



<target name="findTPSnumbers">

:

:

<echo> latest ${latestTPS_dir}</echo>

<echo> previous ${previousTPS_dir}</echo>

<ac:var name="latestTPSDir" unset="true" />

<ac:var name="previousTPSDir" unset="true" />

<ac:propertycopy name="latestTPSDir" from="latestTPS_dir" />

<ac:propertycopy name="previousTPSDir" from="previousTPS_dir" />

<echo> latest ${latestTPSDir}</echo>

<echo> previous ${previousTPSDir}</echo>



<ac:if>

<equals arg1="${latestTPSDir}" arg2="031420080804" />

<ac:then>

<echo>true </echo>

</ac:then>

</ac:if>

</target>



Output shows:

findTPSnumbers:
     [echo]  latest 031420080804
     [echo]  previous 031220082229
     [echo]  latest 031420080804
     [echo]  previous 031220082229
     [echo] true

create_xsl:
     [echo]  LG directory being processed by xslt is
\\filer\lg\MMDDYYYYHHMM\ <file://filer/lg/MMDDYYYYHHMM/>
     [echo]  XSL location
\\filer\ant_scripts\test_report<file://filer/ant_scripts/test_report>
     [echo]  LATEST TPS location MMDDYYYYHHMM
     [echo]  PREVIOUS TPS location MMDDYYYYHHMM

BUILD FAILED
C:\report_main.xml:13: The following error occurred while executing this
line:
C:\report_main.xml:31: Property '\\filer\lg\MMDDYYYYHHMM' is not defined.

RE: property undefined question

Posted by Rick Genter <rg...@silverlink.com>.
> From: Z W [mailto:mpc8250@gmail.com] 
> Sent: Saturday, March 15, 2008 12:41 AM
> To: Ant Users List
> Subject: property undefined question
> 
> <ac:propertycopy name="latestTPSDir2" from="
> ${lg_COMPLETED_RUN_DATA_REPOSITORY}\${latestTPSDir}" />     

I've never used propertycopy, but I believe from is supposed to be the
name of the property, not its value.
--
Rick Genter
Principal Software Engineer
Silverlink Communications
rgenter@silverlink.com
www.silverlink.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org