--- On Thu, 4/9/09, Eric Wood <ew...@llbean.com> wrote:
> From: Eric Wood <ew...@llbean.com>
> Subject: Strip a dirname from a property that represents a path
> To: "Ant Users List" <user@ant.apache.org>
> Date: Thursday, April 9, 2009, 1:31 PM
> I have a property that is a path
> reference to a jar file and I want to
> get the directory name for the element. The task
> dirname works with a
> file to set a property, but is there a simply solution to
> grabbing the
> path to from a file. I assume that I could use the
> ant-contrib
> PropertyRegex task, but was thinking that there is a
> simpler more
> elegant solution. Any thoughts?
>
> <property name="pmd.jar"
> value="/release/pmd/pmd/4.1/pmd-4.1.jar" />
>
> what I want is a property for the "release/pmd/pmd/4.1"
> directory.
>
>From your example I don't see any reason you can't use
<dirname property="foo" file="${pmd.jar}" />
-Matt
> Thanks, Eric
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org