ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Gentle <j.kenneth.gen...@acm.org>
Subject <pathconvert> example...
Date Wed, 20 Feb 2002 13:39:42 GMT
FWIW, I did get pathconvert to address my immediate need although a few 
gyrations were required.  I plan to get a much simpler method in place 
going forward - suggestions or examples welcome!

At the risk of broadcasting my ignorance of Ant idioms, attached is a build 
descriptor that has the skeleton.

The gist of the process is to:
1) Determine the build platform
2) Set up a "template" based on that platform
3) Use the template to build the path
4) Use pathconvert to "canonicalize" the path to the platform.

Using the descriptor on NT 4.0 we see the following:

 > ant -buildfile pathconvert.xml
Buildfile: pathconvert.xml

init:

gen_windows_classpath:

gen_unix_classpath:

generate_classpath:
      [echo] 
what.is.classpath=O:\lib\shared\jdsl-2.0.5\lib\jdsl.jar;O:\lib\shared\jdom-b6\build\jdom.jar

BUILD SUCCESSFUL

Total time: 1 second


On UNIX:

-> ant -buildfile pathconvert.xml
Buildfile: pathconvert.xml

init:

gen_windows_classpath:

gen_unix_classpath:

generate_classpath:
      [echo] 
what.is.classpath=/opt/lib/shared/jdsl-2.0.5/lib/jdsl.jar:/opt/lib/shared/jdom-b6/build/jdom.jar

BUILD SUCCESSFUL

Total time: 2 seconds

Mime
View raw message