ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Richardson <>
Subject style path / classpath problems
Date Fri, 27 Jul 2001 17:31:21 GMT
I want to pass to different absolute paths to ant which has a different
project basedir. I'm using -D with absolute paths. This is the last part
of the
simple shell wrapper.

build_file="-buildfile ${doc_root}/src/example/build.xml"
d_opts="-Ddoc_root=${doc_root} -Djdocbook_home=${jdocbook_home}"
# run ant
${jdocbook_home}/jakarta-ant-1.3/bin/ant ${d_opts} ${build_file} "$@"

In the ant file I try to use 

  <!-- Incoming -D properties:  jdocbook_home, doc_root -->
  <property name="jdocbook.home" location="${jdocbook_home}"/>
  <property name="doc.root" location="${doc_root}"/>

  <!-- docbook xsl/dtd properties -->
  <property name="driver.root" value="${jdocbook.home}/drivers"/>
  <property name="xhtml.driver" value="${driver.root}/xhtmldriver.xsl"/>
  <property name="fo.driver" value="${driver.root}/fodriver.xsl"/>

I got style to work but only when my pieces were all in the same place.
Several people recommended I use the style command rather than the java
command but not having much luck here either.

>From my style command target.

  <target name="style" depends="prepare">
      Outdir: ${output.dir}
      Infile: ${input.dir}/${input.file}
      Driver: ${xhtml.driver}
    <style destdir="${output.dir}" 
	   style="${xhtml.driver}" >
      <include name="${input.dir}/${input.file}"/>

Output, echos are correct.

      Outdir: ../../docs/example
      Indir: ./example.xml
      Driver: /home/maxwell/jdocbook2/drivers/xhtmldriver.xsl
    [style] Transforming into
    [style] Using class
    [style] Loading stylesheet
    [style] Failed to read stylesheet


javax.xml.transform.TransformerConfigurationException: File
not found.
--- Nested Exception ---

Given the echo, I would say that the style command is appending the
basedir and not ant. I removed the basedir and found style doesn't
complain as the docs say it is required. 

I could use help with how to get the classpath to the style task. The
only way I can see is either in my running environment or by putting the
jars in the ant/lib dir which I don't want to do. I have this already in
my file which worked before when I called xalan with a java task.

  <path id="xalan.classpath">
    <fileset dir="${xalan.dir}/bin">
      <include name="xalan.jar"/>
      <include name="xerces.jar"/>
      <include name="bsf.jar"/>

Thanks, I'm really stuck and this is the most reasonable approach I
though of for using ant for this project.


View raw message