tags:

views:

125

answers:

1

Let's say my basedir = c:/projects/myapp/1.2

How can I get "1.2" in a property?

+3  A: 

Check this out.

<basename property="property.for.dirname" file="${basedir}"/>
Georgy Bolyuba
<basename property="jar.filename" file="${lib.jarfile}"/>will set jar.filename to myjar.jar, if lib.jarfile is defined as either a full-path filename (eg., /usr/local/lib/myjar.jar), a relative-path filename (eg., lib/myjar.jar), or a simple filename (eg., myjar.jar).
rodrigoap