ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle Adams" <>
Subject Spaces in the path, XSLT, and Java
Date Fri, 10 Jan 2003 13:51:05 GMT
I have a buildfile that's dynamically generates via XSLT.  Within that
buildfile, I make a java call; one of the args passed into that java
call (via <jvmarg>) contains the property ${user.home}.  On Windows
2000, that resolves to c:\Documents and Settings\<username>, which
causes the java call to fail.

>From the xsl template:

        <java classname="" fork="yes"
failonerror="no" dir="${{env.DEV_DIR}}/{@basedir}">
                <xsl:when test="/workspace/@output = 'stdout'">
                    <arg line="-listener"/>
                    <xsl:attribute name="output"><xsl:value-of
            <jvmarg line="-Dlogfile="{$logdir}/buildlog-{@name}.txt"/>
            <jvmarg line="-Dsnap.home=${{env.SNAP_HOME}}"/>
            <jvmarg line="-Ddev.dir=${{env.DEV_DIR}}"/>
            <jvmarg line="-Dtoken.dir=${{token.dir}}"/>
            <arg line="-listener"/>
            <arg line="-listener
            <arg line="-logger"/>
            <arg line="-buildfile {$snap-file} -emacs snap"/>
                <pathelement path="${{java.class.path}}"/>

The line of particular concern is:

            <jvmarg line="-Dlogfile="{$logdir}/buildlog-{@name}.txt"/>
$logdir is an XSL variable that (by default) contains the ant variable
${user.home}.  The error message I receive is:

     [java] java.lang.NoClassDefFoundError: and
     [java] Exception in thread "main"
     [java] Java Result: 1

Any solution needs to work in XSL, Ant, and be a valid java call.

Kyle Adams
Java Developer
Gordon Food Service

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message