For the curious, i was able to fix my problems by using pathconvert
<target name="-check_proxy_uptodate">
<path id="proxy.path">
<pathelement location="${qproxy.src.dir}"/>
</path>
<pathconvert property="uptodate.path" refid="proxy.path"/>
<uptodate property="proxy.uptodate" srcfile="${uptodate.path}/${cls}">
<globmapper handleDirSep="true" caseSensitive="false"
from="${uptodate.path}/*.java" to="${uptodate.path}/qproxy/*.java"/>
</uptodate>
</target>
----- Original Message -----
From: "Dave Brosius" <dbrosius@apache.org>
To: "Ant Users List" <user@ant.apache.org>
Sent: Monday, June 11, 2007 10:45 PM
Subject: Re: globmapper question
> Ok, i found the problem.
>
> My source path had a .. in it
>
> due to
>
> ${qproxy.src.dir}/${cls}
>
> ${qproxy.src.dir} ended with ..
>
> This then failed the mapper source file test as UptoDate resolves the
> filename, and strips the .. but not the mapper path
>
> It would be nice if UpdateToDate would handle the .. in filenames
> consistently.
>
> --dave
>
>
> ----- Original Message -----
> From: "Dave Brosius" <dbrosius@apache.org>
> To: "Ant Users List" <user@ant.apache.org>
> Sent: Saturday, June 09, 2007 8:11 PM
> Subject: globmapper question
>
>
>> I'm trying to use a globmapper with uptodate task.
>>
>> such as
>>
>> <target name="-check_proxy_uptodate">
>> <uptodate property="proxy.uptodate" srcfile="${qproxy.src.dir}/${cls}">
>> <globmapper from="${qproxy.src.dir}/*.java"
>> to="${qproxy.src.dir}/qproxy/*.java"/>
>> </uptodate>
>> </target>
>>
>> <target name="-buildproxy" depends="-check_proxy_uptodate"
>> unless="proxy.uptodate" description="build a qproxy class from a regular
>> class using the QProxyParser">
>> <java classname="${qproxy.parser}" fork="no">
>> <classpath refid="classes.classpath"/>
>> <arg value="${qproxy.src.dir}/${cls}"/>
>> </java>
>> </target>
>>
>> Used like:
>>
>> <property name="qproxy.src.dir"
>> value="${src.dir}/com/acme/bo/remotable"/>
>> <antcall target="-buildproxy"><param name="cls"
>> value="AsyncJobSvcHdlr.java"/></antcall>
>>
>>
>>
>> basically, it takes as input a simple java class in the remotable
>> directory, and builds a proxy in a sub directory 'qproxy'.
>>
>> when i run it with -v, it says
>>
>>
>> -check_proxy_uptodate:
>> [uptodate]
>> E:\pv\projects\BO\src\com\primavera\bo\remotable\AsyncJobSvcHdlr.java
>> skipped - don't know how to handle it
>>
>>
>> Any ideas what i am doing wrong? thanks!
>>
>> -dave
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|