ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Krisler <bkris...@bbn.com>
Subject Re: Complete newbe question...
Date Wed, 17 Jan 2001 21:29:09 GMT
Remove the "/" from the line:
<fileset dir="C:\sun\kini1_1\lib"/>

In XML, the /> operator closes out the tag.
You closed <fileset> in the opening line which
caused the include to be nested within the <path>
which is not valid.

Brian Krisler
bkrisler@bbn.com

At 10:03 PM 1/17/01 +0100, you wrote:
>Hi!
>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
>c:\sun\inferno\src\inferno\spaces\
>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" />
>                 </fileset>
>
>                 <pathelement location="C:\Program Files\Oracle\JDeveloper
>3.1.1.2\lib\jdev-rt.zip" />
>         </path>
>
>
>   <target name="prepare">
>     <!-- Create the time stamp -->
>     <tstamp/>
>     <!-- Create the build directory structure used by compile -->
>     <mkdir dir="${build}" />
>   </target>
>
>   <target name="compile" depends="prepare">
>     <!-- Compile the java code from ${src} into ${build} -->
>     <javac
>         srcdir="${src}"
>         destdir="${build}"
>         classpathref="a.a"
>         />
>   </target>
>
>   <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>
>
>   <target name="clean">
>     <!-- Delete the ${build} and ${dist} directory trees -->
>     <delete dir="${build}" />
>     <delete dir="${dist}" />
>   </target>
></project>
>  ==========================
>
>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
>
>BUILD FAILED
>
>C:\Sun\Inferno\Src\Inferno\build.xml:15: Class
>org.apache.tools.ant.types.Path d
>oesn't support the nested "include" element
>
>Total time: 0 seconds
>C:\Sun\Inferno\Src\Inferno\Client>
>
>============================
>
>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


Mime
View raw message