You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andrew Thornton <an...@caret.cam.ac.uk> on 2005/01/05 15:38:33 UTC
Classpath for ant:style or xml:transform tags
Hi,
I'm trying to use an extension function in an XSLT stylesheet however
in order to do so, I need to set the classpath on the transformer to
include the jar containing this function. After source diving I finally
managed to work out that ${pom.getDependencyPath('groupid:artifactid')}
would give me the path to the jar, but I can't seem to get this into the
classpath style task. I'd be happy to use the xml:transform task but I
don't even have a clue how to change the classpath for that either.
The relevant section of the maven.xml looks like:
<ant:style out="${xslOutput}" in="${xmlfile}" style="${xslFile}">
<ant:classpath>
<ant:pathelement
location="${pom.getDependencyPath('groupid:artifactid')}"/>
</ant:classpath>
<ant:param name="package"
expression="${basePackage.concat(xmiShortName)}"/>
</ant:style>
I've tried setting the classpath attribute on the style tag and other
similar tricks.
I don't understand how to use maven:addPath, and can't seem to find any
useful docs explaining how to use it. Any help would be appreciated.
Pointers to useful docs would also be appreciated.
andy
--
Andrew Thornton
andrew@caret.cam.ac.uk / andrew@cbcl.co.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Classpath for ant:style or xml:transform tags
Posted by Andrew Thornton <an...@caret.cam.ac.uk>.
Brett Porter wrote:
> what JAR are you trying to add? Is it xalan itself?
>
> There is a problem under some JDKs because xalan needs to be endorsed.
> Details are in the FAQ.
Nope it's a separate jar. I've also listed the jar as a dependency in
the POM.
Thanks,
andy
--
Andrew Thornton
andrew@caret.cam.ac.uk / andrew@cbcl.co.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Classpath for ant:style or xml:transform tags
Posted by Brett Porter <br...@gmail.com>.
what JAR are you trying to add? Is it xalan itself?
There is a problem under some JDKs because xalan needs to be endorsed.
Details are in the FAQ.
Cheers,
Brett
On Wed, 05 Jan 2005 14:38:33 +0000, Andrew Thornton
<an...@caret.cam.ac.uk> wrote:
> Hi,
> I'm trying to use an extension function in an XSLT stylesheet however
> in order to do so, I need to set the classpath on the transformer to
> include the jar containing this function. After source diving I finally
> managed to work out that ${pom.getDependencyPath('groupid:artifactid')}
> would give me the path to the jar, but I can't seem to get this into the
> classpath style task. I'd be happy to use the xml:transform task but I
> don't even have a clue how to change the classpath for that either.
>
> The relevant section of the maven.xml looks like:
>
> <ant:style out="${xslOutput}" in="${xmlfile}" style="${xslFile}">
> <ant:classpath>
> <ant:pathelement
> location="${pom.getDependencyPath('groupid:artifactid')}"/>
> </ant:classpath>
> <ant:param name="package"
> expression="${basePackage.concat(xmiShortName)}"/>
> </ant:style>
>
> I've tried setting the classpath attribute on the style tag and other
> similar tricks.
>
> I don't understand how to use maven:addPath, and can't seem to find any
> useful docs explaining how to use it. Any help would be appreciated.
> Pointers to useful docs would also be appreciated.
>
> andy
>
> --
> Andrew Thornton
> andrew@caret.cam.ac.uk / andrew@cbcl.co.uk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Classpath for ant:style or xml:transform tags
Posted by "Guo, Jiaqi" <ji...@gmail.com>.
Guo, Jiaqi wrote:
> Hi Andrew,
>
> I guess I've met the same problem. Changing dependency definition is
> project.xml won't help. I looks like a bug.
Sorry for so many typing errors. I was out of my mind just now.
> My solution is copying xalan-2.4.1.jar into $MAVEN_HOME/lib/endorsed.
> In $user.home/build.properties, add
> javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
>
>
>
> Good luck
> Jiaqi
>
>
> Andrew Thornton wrote:
>
>> Hi,
>> I'm trying to use an extension function in an XSLT stylesheet
>> however in order to do so, I need to set the classpath on the
>> transformer to include the jar containing this function. After source
>> diving I finally managed to work out that
>> ${pom.getDependencyPath('groupid:artifactid')} would give me the path
>> to the jar, but I can't seem to get this into the classpath style
>> task. I'd be happy to use the xml:transform task but I don't even
>> have a clue how to change the classpath for that either.
>>
>> The relevant section of the maven.xml looks like:
>>
>> <ant:style out="${xslOutput}" in="${xmlfile}" style="${xslFile}">
>> <ant:classpath>
>> <ant:pathelement
>> location="${pom.getDependencyPath('groupid:artifactid')}"/>
>> </ant:classpath>
>> <ant:param name="package"
>> expression="${basePackage.concat(xmiShortName)}"/>
>> </ant:style>
>>
>> I've tried setting the classpath attribute on the style tag and other
>> similar tricks.
>>
>> I don't understand how to use maven:addPath, and can't seem to find
>> any useful docs explaining how to use it. Any help would be
>> appreciated. Pointers to useful docs would also be appreciated.
>>
>> andy
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Classpath for ant:style or xml:transform tags
Posted by "Guo, Jiaqi" <ji...@gmail.com>.
Hi Andrew,
I guess I've met the same problem. Changing dependency definition is
project.xml won't help. I looks like a bug.
My solution is copying xalan-2.4.1.jar into $MAVEN_HOME/lib/endorsed. In
$user.home/build.properties, add
javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
Good luck
Jiaqi
Andrew Thornton wrote:
> Hi,
> I'm trying to use an extension function in an XSLT stylesheet
> however in order to do so, I need to set the classpath on the
> transformer to include the jar containing this function. After source
> diving I finally managed to work out that
> ${pom.getDependencyPath('groupid:artifactid')} would give me the path
> to the jar, but I can't seem to get this into the classpath style
> task. I'd be happy to use the xml:transform task but I don't even have
> a clue how to change the classpath for that either.
>
> The relevant section of the maven.xml looks like:
>
> <ant:style out="${xslOutput}" in="${xmlfile}" style="${xslFile}">
> <ant:classpath>
> <ant:pathelement
> location="${pom.getDependencyPath('groupid:artifactid')}"/>
> </ant:classpath>
> <ant:param name="package"
> expression="${basePackage.concat(xmiShortName)}"/>
> </ant:style>
>
> I've tried setting the classpath attribute on the style tag and other
> similar tricks.
>
> I don't understand how to use maven:addPath, and can't seem to find
> any useful docs explaining how to use it. Any help would be
> appreciated. Pointers to useful docs would also be appreciated.
>
> andy
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org