Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Suhas Saheer
Greenhorn
Posts: 17
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • 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]
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks you!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's PFA?
 
Suhas Saheer
Greenhorn
Posts: 17
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PFA mean "Please find attached"
 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • 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?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nikos, please continue this discussion in your other thread here http://www.coderanch.com/t/587747/tools/Ant-base-dir
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic