Apache Ant/Best Practices/Local File Systems

Dealing with Local File System Issues edit

  • Each developer or user has the right (or is forced by administrators) to put resource such as jar files and libraries in different locations
  • Try to avoid having ANY local file system location dependencies in your build files. Make sure you NEVER put C: in a build file. This is just plain bad behavior
  • Separate local file system access points in an external "property file"
  • Warning: property files are read by Java tools and are not always path separator aware. You can use "\\" on java, or, knowing that Ant expands existing properties, ${path.separator}
  • Allow people to check out all the files in a project including the build.xml file, customize their local library paths and build
  • Third party projects such as Ivy and Maven2 Ant tasks try to automate the entire library management process. Consider these on a very large/complex project.