ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HÃ¥kan Andersson <>
Subject Complete newbe question...
Date Wed, 17 Jan 2001 21:03:59 GMT
I'm sorry for disturbing the group with a very basic question, but I have
several days now read the Ant user manual, read the posts in this group and
still not been able to put togeather a simple buildfile.

This is the case: I have some .java files in a directory
I want to compile them and put them in c:\sun\inferno\bin\inferno\spaces\
This is the buildfile that I try to use:
<project name="MyProject" default="compile" basedir="c:\sun\inferno\">

  <!-- set global properties for this build -->
  <property name="src" value="src\inferno\spaces\" />

  <property name="build" value="bin\inferno\spaces\" />

  <property name="dist"  value="dist" />

	<path id="a.a">
		<pathelement location="c:\sun\inferno\bin\" />
		<pathelement location="c:\sun\jdk1.3\jre\lib\rt.jar" />

		<fileset dir="c:\sun\jini1_1\lib"/>
			<include name="**/*.jar" />

		<pathelement location="C:\Program Files\Oracle\JDeveloper\lib\" />

  <target name="prepare">
    <!-- Create the time stamp -->
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}" />

  <target name="compile" depends="prepare">
    <!-- Compile the java code from ${src} into ${build} -->

  <target name="dist" depends="compile">
    <!-- Create the ${dist}/lib directory -->
    <mkdir dir="${dist}/lib" />

    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar
file -->
    <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}" />

  <target name="clean">
    <!-- Delete the ${build} and ${dist} directory trees -->
    <delete dir="${build}" />
    <delete dir="${dist}" />

When I run the Ant command, I get the following result:

C:\Sun\Inferno\Src\Inferno\Client>ant -verbose
Ant version 1.2 compiled on October 24 2000

Searching for build.xml ...
Searching in C:\Sun\Inferno\Src\Inferno\Client
Searching in C:\Sun\Inferno\Src\Inferno
Buildfile: C:\Sun\Inferno\Src\Inferno\build.xml
Detected Java Version: 1.3
Detected OS: Windows 2000
Project base dir set to: C:\Sun\Inferno


C:\Sun\Inferno\Src\Inferno\build.xml:15: Class d
oesn't support the nested "include" element

Total time: 0 seconds


I want to use some sort of file-set for the classpath that I will use later
in the javac command.
But I am not able to get pass the "file id" tag in the buildfile.
And I have ran out of ideas...

Please help!

Once again.. This is probably something very basic and I apologize if anyone
think that this is a waste of bandwith.

	/Hakan Andersson

View raw message