• 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

What's this?

 
village idiot
Posts: 1208
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to really understand what's going on with the build.xml file and the directory structure in my development directory. I came across this property tag in the build.xml file that is located in C:\java, which is my development directory:

<property name="app.name" value="${ant.project.name}" >

Where does the value attribute come from? I can't find a spot where "${ant.project.name}" is defined. And this bothers me!

Also, given the following:

- <target name="init">
<property file="${user.home}/build.properties" />
<property name="app.name" value="${ant.project.name}" />
<property name="src.dir" location="src" />
<property name="lib.dir" location="lib" />
<property name="build.dir" location="build" />
<property name="classes.dir" location="${build.dir}/classes" />
<property name="dist.dir" location="${build.dir}/dist" />
</target>
- <target name="initdirs" depends="init">
<mkdir dir="${classes.dir}" />
<mkdir dir="${dist.dir}" />
</target>
- <target name="compile" depends="initdirs">
- <javac srcdir="${src.dir}/java" destdir="${classes.dir}">
+ <classpath>
<fileset dir="${lib.dir}" includes="j2ee.jar jr.jar" />
</classpath>
</javac>
</target>
if the /java is removed from <javac srcdir="${src.dir}/java" .......
would my html files, jsp files, and com folder go directly in the src directory?
[ August 10, 2006: Message edited by: Carol Murphy ]
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Originally posted by Carol Murphy:
I'm trying to really understand what's going on with the build.xml file and the directory structure in my development directory. I came across this property tag in the build.xml file that is located in C:\java, which is my development directory:

<property name="app.name" value="${ant.project.name}" >

Where does the value attribute come from?


It's a "built in" ant property


If the /java is removed from <javac srcdir="${src.dir}/java" .......
would my html files, jsp files, and com folder go directly in the src directory?


javac srcdir="the directory where your *.java files that need to be compiled live" (and subdirectories of that directory). You don't compile your html or jsp files so they wouldn't be affected one way or the other. But, yes, your com tree (folder) would go there.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic