• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What's this?

 
Carol Murphy
village idiot
Bartender
Posts: 1203
  • Mark post as helpful
  • send pies
  • 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 ]
 
Marilyn de Queiroz
Sheriff
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic