Return-Path: Delivered-To: apmail-maven-users-archive@www.apache.org Received: (qmail 58791 invoked from network); 1 Apr 2008 15:51:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Apr 2008 15:51:10 -0000 Received: (qmail 28611 invoked by uid 500); 1 Apr 2008 15:50:59 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 28556 invoked by uid 500); 1 Apr 2008 15:50:59 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 28545 invoked by uid 99); 1 Apr 2008 15:50:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2008 08:50:59 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cosminaru@gmail.com designates 209.85.162.182 as permitted sender) Received: from [209.85.162.182] (HELO el-out-1112.google.com) (209.85.162.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2008 15:50:16 +0000 Received: by el-out-1112.google.com with SMTP id m34so828958ele.9 for ; Tue, 01 Apr 2008 08:50:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=amQeGpiiP08WCnP5di0hTj9LvmlvdnbX0XNZ4rGhsi8=; b=MYKCDMNNTJh2a+BLD+wfXBSpbpOYdiI4Qu7YiWW1jjIiMGXTQEf7C4gnOgjZlALDLNsbZMgynuCjWxq95j0Gj+VDvEkJn0Y1Mptaxd7FTADtPPz0pDg2XtkfWslO/ongkttknY5rOIoqk9j+hF3ZixNZt0b5XKjGKkD8yTWBkTo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=g2yX9bSi6q3jj17rbchXltWaieGqNCMR22oDPPZXIvnIJR36AjiFCNG7m2M7eU9oywABYSYOpZiCPco5zjy4YA2FZvyAT3/FoHTj9A5SUyp62lfSGSLaqb2WmHIr3QEZciPmuJpJuoxgZ23woIFbfbPVOWloaBCrOOOepUdzk2Q= Received: by 10.115.92.2 with SMTP id u2mr12618724wal.139.1207065024258; Tue, 01 Apr 2008 08:50:24 -0700 (PDT) Received: by 10.114.235.11 with HTTP; Tue, 1 Apr 2008 08:50:24 -0700 (PDT) Message-ID: <8657bdca0804010850lbad41f0k3efc0411ce41656a@mail.gmail.com> Date: Tue, 1 Apr 2008 18:50:24 +0300 From: "Cosmin Marginean" To: "Maven Users List" Subject: Re: Third Party Jar In-Reply-To: <52bab8690804010825r3de03d80j54586e94781fb4bc@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_29506_22252932.1207065024225" References: <8657bdca0803280004r56a2d94bn386cb717658ae0d@mail.gmail.com> <8657bdca0803280230t13f8a04bj1ec2a0edd7644c0f@mail.gmail.com> <52bab8690803280729j5b37383rf4d8f33cd8c8180f@mail.gmail.com> <8657bdca0804010251m309eeed1te5f3c4be7019f8f9@mail.gmail.com> <52bab8690804010825r3de03d80j54586e94781fb4bc@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_29506_22252932.1207065024225 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 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 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 section). Could this be a cause why the transformer > is > > not loaded? > > > > Thanks > > > > On Fri, Mar 28, 2008 at 5:29 PM, Wayne Fay 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 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 < > cosminaru@gmail.com> > > > > 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: users-unsubscribe@maven.apache.org > > > For additional commands, e-mail: users-help@maven.apache.org > > > > > > > > > > > > -- > > Cosmin Marginean > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > For additional commands, e-mail: users-help@maven.apache.org > > ------=_Part_29506_22252932.1207065024225--