• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Ant Build...What does the values in basedir="" mean?

 
Greenhorn
Posts: 17
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
PFA my project structure.
I created a build.xml file and used the statement to get the placeholder values.
<property file="build.properties"></property>

But i cant read the values from the properties file.
Seems like the directory is wrong.

I have given like this
<project name="Project " default="compile" basedir="..">

Seems like the basedir is not correct.
Please tell me what is the correct value to be given and i am also confused about this ".." , "../" and so on.
Pjt-structure.JPG
[Thumbnail for Pjt-structure.JPG]
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Regarding PFA: http://faq.javaranch.com/java/UseRealWords

Using '.' means 'current directory', and '..' means 'parent directory'. For a build.xml file, the directory in which the build.xml file resides is considered the current directory.

It is usually a standard practice that basedir is set to '.', and not to '..'. Also it is another standard practice that build.properties appears in the same directory as build.xml. And usually the build.xml file appears in the base directory of the project (in your case, move build.xml to where build.properties is located)

If you really do not want to move your build.xml or build.properties file, or change the basedir, use this:


 
Suhas Saheer
Greenhorn
Posts: 17
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks you!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's PFA?
 
Suhas Saheer
Greenhorn
Posts: 17
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PFA mean "Please find attached"
 
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, may I ask something?

using base dir for messes up things like this which are supposed to be unaffected because they are absolute ones.

<taskdef name="mxmlc" classname="flex.ant.MxmlcTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<taskdef name="compc" classname="flex.ant.CompcTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<taskdef name="html-wrapper" classname="flex.ant.HtmlWrapperTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<taskdef name="asdoc" classname="flex.ant.AsDocTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>

Any ideas?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nikos, please continue this discussion in your other thread here https://coderanch.com/t/587747/tools/Ant-base-dir
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic