ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shireesh Thanneru <thann...@ece.villanova.edu>
Subject Re: Does Ant require a particular version of XML parser ?
Date Tue, 06 Feb 2001 16:48:49 GMT

Use fork="yes" for the Java task.

Shireesh Thanneru


--- Yusuf Goolamabbas <yusufg@outblaze.com> wrote:
> Hi, I am trying to use ant to compile one of the sample program
> [SimpleTransform.java] in Xalan 2.0. I downloaded Xalan 2.0 and
> installed xalan.jar and xerces.jar [the one which was distributed
> alongwith xalan in $HOME/classes]
> 
> From the command line, I was able to do the following
> 
> javac -cp $HOME/classes/xerces.jar:$HOME/classes/xalan.jar:. 
> SimpleTransform.java
> java -cp $HOME/classes/xerces.jar:$HOME/classes/xalan.jar:. 
> SimpleTransform
> 
> and everything works, when I write the following build.xml file. I can
> get the compile targe to work but the run target gives the error
> attached
> 
> 
> <project name="Foo" default="compile" basedir=".">
> 
> <property name="build.compiler" value="jikes" />
> <property name="srcfile" value="/home/yusufg/work/style" />
> <property name="cdir" value="/home/yusufg/classes" />
> 
> <path id="project.class.path">
> <pathelement path="${cdir}/rt.jar;${cdir}/xerces.jar;${cdir}/xalan.jar;."
> />
> <!--
> <pathelement path="${cdir}/jdom.jar" />
> -->
> </path>
> 
> <patternset id="sources">
> <include name="*.java" />
> </patternset>
> 
> <patternset id="classes">
> <include name="*.class" />
> </patternset>
> 
> <target name="compile">
> <javac  srcdir="${srcfile}">
> <classpath refid="project.class.path" />
> <patternset refid="sources" />
> </javac>
> </target>
> 
> <target name="run" depends="compile">
> <java classname="SimpleTransform">
> <arg file="birds.xml" />
> <arg file="birds.xsl" />
> <classpath refid="project.class.path" />
> </java>
> </target>
> 
> <target name="clean">
> <delete>
> <fileset dir="${srcfile}">
> <patternset refid="classes" />
> </fileset>
> </delete>
> </target>
> </project>
> 
> Is there some mismatch of the XML parser or am I doing something wrong ?
> 
> -- 
> Yusuf Goolamabbas
> yusufg@outblaze.com
> > Searching for build.xml ...
> Buildfile: /home/yusufg/work/style/build.xml
> 
> compile:
> 
> run:
> 
> BUILD FAILED
> 
> /home/yusufg/work/style/build.xml:35:
> javax.xml.transform.TransformerConfigurationException: Namespace not
> supported by SAXParser
> javax.xml.transform.TransformerConfigurationException: Namespace not
> supported by SAXParser
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:650)
> 	at SimpleTransform.main(SimpleTransform.java:34)
> 	at java.lang.reflect.Method.invoke(Native Method)
> 	at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java)
> 	at org.apache.tools.ant.taskdefs.Java.run(Java.java)
> 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java)
> 	at org.apache.tools.ant.taskdefs.Java.execute(Java.java)
> 	at org.apache.tools.ant.Target.execute(Target.java)
> 	at org.apache.tools.ant.Project.runTarget(Project.java)
> 	at org.apache.tools.ant.Project.executeTarget(Project.java)
> 	at org.apache.tools.ant.Project.executeTargets(Project.java)
> 	at org.apache.tools.ant.Main.runBuild(Main.java)
> 	at org.apache.tools.ant.Main.main(Main.java)
> ---------



Mime
View raw message