• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

specify path build.properties of ant

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi -

Is there a way to specify a network path in the build.properties file for ant?

Example, build.properties has -

mylib=\\machine_name\lib

When I try to run the build file, it fails because ant is trying to look in C:\machine_name\lib.

What is the right way to specify the network path in build.properties file?
Thanks.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to escape backslashes in property files, just as you would do in Java String literals.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ilja Preuss:
You need to escape backslashes in property files, just as you would do in Java String literals.



... Which can get really ugly. Try this instead:

mylib=//machine_name/lib

Because this is a UNC name, I won't guarantee it will work, but in most cases, "portable" filepaths can be created for Java using the Unix forward-slash syntax and Windows will understand.
 
Suma Rangaraj
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your response guys.

In case it helps others, I have achieved this by mounting the disk on the local machine. So, I no longer have to use the network path. I can refer to it as
mylib=D:\\<path to libs>
 
reply
    Bookmark Topic Watch Topic
  • New Topic