I see. However, i don't think the codehaus plugin is close enough nor would
be usefull to update it with my needs. This is a very specific plugin and
should not be used as a general purpose XSL translator. Anyways, in case you
ever get the time to take a look:
1. the plugin's pom.xml:
http://testng-xslt.googlecode.com/svn/trunk/pom.xml
2. the actual report Mojo:
http://testng-xslt.googlecode.com/svn/trunk/src/main/java/org/testng/xslt/mavenplugin/TestNgXsltMojo.java
(You can ignore the boiler plate. The problem is around the commented lines
above the TODO - the project that is used to test the plugin fails with "
javax.xml.transform.TransformerFactoryConfigurationError: Provider
net.sf.saxon.TransformerFactoryImpl not found" when uncommenting them)
3. the pom.xml of the project that I use to test the plugin:
http://testng-xslt.googlecode.com/svn/trunk/test/maven/pom.xml

There are workarounds that I could implement. However, i need to know if I
am missing something as this seems to be a classloader issue, as far as I
can tell. I also tried to manually set the classloader on the current thread
with the one of net.sf.saxon.TransformerFactoryImpl and curiously it worked,
so my guess is that the search is performed in the plugin's classloader and
not in the top-level classloader.

Thanks anyways,
Cosmin

On Tue, Apr 1, 2008 at 6:25 PM, Wayne Fay <[EMAIL PROTECTED]> wrote:

> I have no clue without going into the code and looking at it, and I'm
> not doing that today.
>
> If you decide the codehaus plugin is close enough, feel free to modify
> it and submit your modifications for future incorporation into the
> plugin. Then everyone benefits from your changes.
>
> Wayne
>
> On 4/1/08, Cosmin Marginean <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Thanks for the suggestion. I have tried this and it seems to lack some
> > features that I really need in my plugin. So appearently I will need to
> > write my own plugin. However, I analyzed some of the code in this plugin
> and
> > it doesn't seem to do a lot more different stuff that I am doing, since
> the
> > standard transformation API is used. The only difference seems to be
> that
> > the xml-maven-plugin is run at build time, while mine is run at report
> time
> > (in the <reporting> section). Could this be a cause why the transformer
> is
> > not loaded?
> >
> > Thanks
> >
> > On Fri, Mar 28, 2008 at 5:29 PM, Wayne Fay <[EMAIL PROTECTED]> wrote:
> >
> > > There is already an XML plugin in Codehaus which has XSLT
> > > functionality. Why don't you just take a look at it before moving too
> > > far down this path of possibly re-implementing an existing solution?
> > >
> > > http://mojo.codehaus.org/xml-maven-plugin/
> > >
> > > Wayne
> > >
> > > On 3/28/08, Cosmin Marginean <[EMAIL PROTECTED]> wrote:
> > > > It seems that this goes deeper. What I actually need to do is create
> a
> > > Maven
> > > > plugin that performs an XSL transformation using Saxon 9. I unpacked
> the
> > > > Saxon 9 jar and added the classes to my plugin jar to make sure the
> > > > transformer is loaded. However, it seems that the transformer won't
> get
> > > > loaded, even when I run Maven with
> > > >    -
> > > >
> > >
> Djava.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl
> > > > Some people seem to have worked around this by specifying the Saxon
> > > > dependency in the client pom.xml but this doesn't seem to work if I
> make
> > > the
> > > > transformation call from the plugin Jar. I even set the property
> > > manually in
> > > > the plugin:
> > > >    TransformerFactory factory = TransformerFactory.newInstance();
> > > > But without any luck. The transformer will not be found
> > > >
> > > > Thanks in advance
> > > >
> > > > On Fri, Mar 28, 2008 at 9:04 AM, Cosmin Marginean <
> [EMAIL PROTECTED]>
> > > > wrote:
> > > >
> > > > > Hello guys,
> > > > >
> > > > > Sorry to bother you with such issues, but I've googling my brains
> out
> > > with
> > > > > this without any relevant results.
> > > > > I have a question regarding bundling a 3rd party jar in a Maven
> > > Plugin. I
> > > > > am a bit new to Maven and Maven plugins.
> > > > > I tried bundling it in the plugin jar and adding it to the
> Class-Path
> > > > > attribute of MANIFEST.MF, but it seems to be ignored when using
> the
> > > > > plugin.
> > > > > Another question would be: assuming that somehow this 3rd party
> jar
> > > will
> > > > > make it into a public repository, what is the proper way to
> configure
> > > the
> > > > > dependency to make sure that the client (plugin user) will
> download
> > > and load
> > > > > this jar correctly without having to configure 3rd third party
> > > dependency in
> > > > > the pom.xml?
> > > > >
> > > > > Many thanks in advance
> > > > >
> > > > > --
> > > > > Cosmin Marginean
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Cosmin Marginean
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Cosmin Marginean
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to