cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: Cocoon Ant Task
Date Thu, 01 Apr 2004 10:34:04 GMT
Corey Keith wrote:

> I'm trying to use the CocoonTask from ant and when I include the 
> load-class element in the cocoon target I get the following error.  
> Below is my build.xml.
>  
> BUILD FAILED
> C:\vets\build.xml:10: Class 
> org.apache.cocoon.CocoonTask$ElementWrapper doesn't support nested 
> text data.
>  
> Is this a bug or should I be loading database driver classes 
> differently with ant?
>  

Basically, Ant cannot handle <node>some text</node> in the configuration 
of a task. So you need to do <cocoon load-class="xxxx", i.e. replace the 
<load-class> node with an attribute on the <cocoon> node. Make sense?

Did you find this in the documentation? Maybe there's an error in the 
docs that we should fix - or a clarification that we need to make.

Regards, Upayavira

> Thanks,
> Corey
>  
> <project default="generate" basedir=".">
>  <property name="cocoon.context" value="/cocoon-2.1.4/build/webapp"/>
>  <path id="cocoon.classpath">
>   <dirset dir="${cocoon.context}/WEB-INF/classes"/>
>   <fileset dir="${cocoon.context}/WEB-INF/lib" includes="*.jar"/>
>  </path>
>  <taskdef name="cocoon" classname="org.apache.cocoon.CocoonTask" 
> classpathref="cocoon.classpath"/>
>  <target name="generate">
>   <cocoon verbose="true" classpathref="cocoon.classpath" 
> follow-links="true" precompile-only="false" confirm-extensions="false" 
> context-dir="${cocoon.context}" config-file="WEB-INF/cocoon.xconf" 
> work-dir="build/work" dest-dir="build/dest" 
> default-filename="hello.html" accept="*/*">
>    <broken-links type="xml" file="brokenlinks.xml" generate="false" 
> extension=".err"/>
>    <load-class>sun.jdbc.odbc.JdbcOdbcDriv er</load-class>
>    <logging log-kit="${cocoon.context}/WEB-INF/logkit.xconf" 
> logger="cli" level="DEBUG"/>
>    <uris name="vets" follow-links="true">
>     <uri type="append" src-prefix="vets/" src="vetslist.html" 
> dest="C:\mets"/>
>    </uris>
>   </cocoon>
>  </target>
> </project>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message