I assume you have saxon in your dependencies and have set a system property
to make it the parser?

You probably need to specify a classloader on the dependency - check the
FAQ.

BTW, the <path if="classpath"> .. bit in the second example is redundant -
you can use maven.dependency.classpath as a refid.

> -----Original Message-----
> From: Pavel Sher [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, 17 September 2003 10:07 PM
> To: [EMAIL PROTECTED]
> Subject: Maven, Jelly and classpath problems
> 
> 
> Hello,
> 
> It is unclear for me how the classpaths are work in the maven 
> + Jelly. I have a simple maven.xml file:
> 
> <project default="sds:sample" xmlns:j="jelly:core" 
> xmlns:maven="jelly:maven" xmlns:util="jelly:util">
> 
>     <goal name="sds:sample">
> 
>         <mkdir dir="target"/>
> 
>         <j:file outputMode="html" prettyPrint="on" 
> name="${basedir}/target/output.html">
>             <j:include file="${basedir}/templates/sample1.xhtml"/>
>         </j:file>
> 
>     </goal>
> 
> </project>
> 
> My dependencies written in project.xml include all the 
> necessary jar files, but it seems to me that sample1.xhtml 
> does not inherit these dependencies. For example, if I will 
> try to use <xml:transform/> tag, then I've got the following error:
> 
> BUILD FAILED
> File...... file:/C:/Work/SDS/
> Element... j:include
> Line...... 17
> Column.... 67
> file:/C:/Work/SDS/templates/sample1.xhtml:22:90: 
> <x:transform> Provider net.sf.saxon.TransformerFactoryImpl not found
> 
> If I will try to start Jelly as java process then all works fine:
> 
> <project default="sds:sample" xmlns:j="jelly:core" 
> xmlns:maven="jelly:maven" xmlns:util="jelly:util">
> 
>     <goal name="sds:sample">
> 
>         <mkdir dir="target"/>
> 
>         <path id="classpath">
>             <path refid="maven.dependency.classpath"/>
>         </path>
> 
>         <java classname="org.apache.commons.jelly.Jelly" fork="yes">
>             <classpath refid="classpath"/>
>             <arg value="${basedir}/templates/sample1.xhtml"/>
>         </java>
> 
>     </goal>
> 
> </project>
> 
> Although this is a workaround it is much less usable then the 
> example above. 
> Is there any chance to have jars loaded when I use <j:include/> tag?
> 
> P.S:
> I am using maven-1.0-beta-10 and commons-jelly-SNAPSHOT
> 
> --
> Best regards
> 
> Pavel Sher, [EMAIL PROTECTED]
> 
> 

Reply via email to