You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris Hagmann <ch...@yahoo.com> on 2006/01/03 06:05:10 UTC

[m2] Package XSL file with plugin and use it for XSLT when executing the plugin

I developed a Maven2 plugin which fetches information
from JIRA, writes it into a changelog.xml and then
converts the changelog into a nicely formatted XHTML
release notes page. It does this by using a XSL
stylesheet and executing a XSLT on the changelog file.
This all works fine, but until now I need to store the
stylesheet with each project (e.g. in
src/etc/xsl/xhtml.xsl). The plugin then loads the
stylesheet from that location, and does the
transformation. 

However, I'd like to simply package the stylesheet
with the plugin, and load it from within the plugin.
That way the stylesheet doesn't have to added to each
project.

How can I achieve something like this?

Thanks,
Chris

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


Re: [m2] Package XSL file with plugin and use it for XSLT when executing the plugin

Posted by dan tran <da...@gmail.com>.
You can package the style sheet with plugin as java resource.
Than at runtime, copy the style sheet to user's project build directory.

If you need the code to copy the java resourcce, let me know

-D


On 1/2/06, Chris Hagmann <ch...@yahoo.com> wrote:
>
> I developed a Maven2 plugin which fetches information
> from JIRA, writes it into a changelog.xml and then
> converts the changelog into a nicely formatted XHTML
> release notes page. It does this by using a XSL
> stylesheet and executing a XSLT on the changelog file.
> This all works fine, but until now I need to store the
> stylesheet with each project (e.g. in
> src/etc/xsl/xhtml.xsl). The plugin then loads the
> stylesheet from that location, and does the
> transformation.
>
> However, I'd like to simply package the stylesheet
> with the plugin, and load it from within the plugin.
> That way the stylesheet doesn't have to added to each
> project.
>
> How can I achieve something like this?
>
> Thanks,
> Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>