sourcepath switch for javac from ant
From: Thufir (thufir.hawat_at_mail.com)
Date: 01/31/05
- Previous message: Thufir: "Re: Java programming tutorials and sites"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Jan 2005 00:33:48 -0800
I'm trying to invoke "javac" with the sourcepath switch so that
Tidy.jar can be used as a package. There might be a problem with how
the property's are declared, perhaps?
C:\>
C:\>ant
Buildfile: build.xml
BUILD FAILED
C:\build.xml:23: Element type "javac" must be followed by either
attribute spe
cifications, ">" or "/>".
Total time: 0 seconds
C:\>type build.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="JTidy" default="package">
<property name="outputDir"
value="C:\java\classes\" />
<property name="sourceDir"
value="C:\java\sources\atreides\jtidy\" />
<property name="sourceDir2"
value="C:\java\sources\org\w3c\tidy\Tidy.jar" />
<property name="mainClass"
value="TidyTest" />
<target name="clean">
<delete dir="${outputDir}" />
</target>
<target name="prepare" depends="clean">
<mkdir dir="${outputDir}" />
</target>
<target name="compile" depends="prepare">
<javac
<sourcepath>
srcdir="${sourceDir}"
srcdir2="${sourceDir2}"
</sourcepath>
<classpath>
destdir="${outputDir}" />
</classpath>
</target>
<target name="manifest" depends="compile">
<manifest file="${outputDir}/MANIFEST.MF">
<attribute name="Main-Class"
value="atreides.monsters.${mainClass}" />
</manifest>
</target>
<target name="package" depends="manifest">
<jar jarfile="${outputDir}/${mainClass}.jar"
basedir="${outputDir}"
manifest="${outputDir}/MANIFEST.MF" />
</target>
</project>
C:\>
I'm trying to use the following as a template:
<target ... >
<javac ...>
<classpath>
<pathelement location="lib/"/>
<pathelement path="${java.class.path}/"/>
<pathelement path="${additional.path}"/>
</classpath>
</javac>
</target>
</project>
from <http://ant.apache.org/manual/using.html#references>
Thanks,
Thufir Hawat
- Previous message: Thufir: "Re: Java programming tutorials and sites"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|