Return-Path: Delivered-To: apmail-maven-archiva-dev-archive@locus.apache.org Received: (qmail 29443 invoked from network); 27 Feb 2008 16:57:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Feb 2008 16:57:00 -0000 Received: (qmail 38405 invoked by uid 500); 27 Feb 2008 16:56:55 -0000 Delivered-To: apmail-maven-archiva-dev-archive@maven.apache.org Received: (qmail 38364 invoked by uid 500); 27 Feb 2008 16:56:55 -0000 Mailing-List: contact archiva-dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: archiva-dev@maven.apache.org Delivered-To: mailing list archiva-dev@maven.apache.org Received: (qmail 38355 invoked by uid 99); 27 Feb 2008 16:56:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Feb 2008 08:56:55 -0800 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 nicolas.deloof@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nf-out-0910.google.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Feb 2008 16:56:22 +0000 Received: by nf-out-0910.google.com with SMTP id f5so1699315nfh.26 for ; Wed, 27 Feb 2008 08:56:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; bh=nOeNWje252DtER6ETiKof82hO/cPPRfvw1KKR+6KEHE=; b=gE6l2nohfTZadQQ3eSkBUopidLCODyDO7YX+6nRwBoieWt8/rhWjs3DOPTWR5y67Nf6u3vpvPpwnH/y1D8dzMyDiIiZDE2ghSA4ceENAI6oughSsi0E9/ZxEkME92qoYFlJjRigjX+ryOM60TjURdTV8I31AhTuQHwGukyhj5gc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=un321l18aRutpFmBc25O4UmcZeRed2dr71FXgKMCrAhUwedwg9Dtq3s0VMoIZjqcxDGZ+q5eetUe1dRGlUPZMQCoB3sZVJs7hJ+Mzlhh5dJEF4SxpLXU6DCEpI2wmowZvbSlPyemaLb6r+bPgfgpOsxBANpgqMhRpH+akJC14XA= Received: by 10.78.176.20 with SMTP id y20mr6617520hue.1.1204131390574; Wed, 27 Feb 2008 08:56:30 -0800 (PST) Received: by 10.78.136.1 with HTTP; Wed, 27 Feb 2008 08:56:30 -0800 (PST) Message-ID: <4c39e3030802270856k11c3970ei13b894c52d170519@mail.gmail.com> Date: Wed, 27 Feb 2008 17:56:30 +0100 From: "nicolas de loof" Sender: nicolas.deloof@gmail.com To: archiva-dev@maven.apache.org Subject: Re: from plexus to spring... In-Reply-To: <4c39e3030802270748n6ece26e5mcd7225a56fbf3b24@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13777_22128931.1204131390568" References: <4c39e3030802250137q47fb48c1wf86c50f93528e84e@mail.gmail.com> <47C31B15.8010208@gmail.com> <4c39e3030802251322o42cb4360ve1ff506e37ebc8b0@mail.gmail.com> <47C39864.60405@erdfelt.com> <4c39e3030802260547u2733b980kf6540ced7ea025c@mail.gmail.com> <4c39e3030802270748n6ece26e5mcd7225a56fbf3b24@mail.gmail.com> X-Google-Sender-Auth: c599fb1e3aba69c3 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_13777_22128931.1204131390568 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I just committed partial support for PlexusConfiguration : - as XML validation is disabled the XML configuration doesn't require to be in a CDATA section - the namespaceHandler detects structured configuration and creates a DomPlexusConfiguration for it. - Still have to implement DomPlexusConfiguration as XmlPlexusConfiguration requires Xpp3Dom. Still some work on this feature and I expect to pass archiva-configuration tests. Nico. 2008/2/27, nicolas de loof : > > I've solved the main issues, added some tiny doc and unit tests. > > Still early alpha code but now stable and ready for review if you want to > test it on Continuum. > > Some tests (like DefaultPathParserTest) migrate succesfully to spring > context execution using the PlexusInSpringTestCase without any change. > > Many other archiva tests fails as the XSLT translation cannot convert XML > formated "configuration" to be injected in CommonsConfigurationRegistry as a > PlexusConfiguration : > > > org.codehaus.plexus.registry.Registry > configured > org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry > > > > > config-name="org.apache.maven.archiva" config-at=" > org.apache.maven.archiva"/> > > > > > The current stylesheet converts such to a blank value. > > To support such configuration, we need > > 1. a String2PlexusConfiguration PropertyEditor (maybe not trivial, but > should be possible) > 2. a XSL way to store the configuration child nodes as XML attributes. > > I'm a XSL newbee so have no idea how to output the current node and all > it's children as a text content. > I've tested but without the expected result. > > I also tried to set the configuration value as a nested CDATA content, but > cannot find how to create the plexus:configuration content as as CDATA > element. didn't > fix this. > > > > > > > > > 2008/2/26, nicolas de loof : > > > > For your information, plexus-spring no handle plexus requirement without > > filed-name set. > > > > The -Dplexus-spring.debug=true option can be used to dump the translated > > spring XML (using dom4j) > > > > PlexusInSpringTestCase as been used as replacement for PlexusTestCase in > > archiva-policies with no other change required in the test class (only a new > > spring context file required to declare the LoggerManager) > > > > Some debugging logs have been added to trace the filed-injection and > > dependencies resolution. > > > > > > .. but still not ready as > > CacheFailuresTransferTest.testGetWithCacheFailuresOff pass run alone, > > but not if ran after testGetWithCacheFailuresOn! > > Seems there is some incomplete support on context cleanup / dispose > > > > Please be patient, Rahul ;-) > > > > Nico. > > > > > > > > 2008/2/26, Joakim Erdfelt : > > > > > > nicolas, > > > > > > This is way cool! > > > A very slick way of helping the transition. > > > I'm looking forward to some free time to dive into it. > > > > > > > > > - Joakim > > > > > > > > > > > > nicolas de loof wrote: > > > > Hi Rahul, > > > > > > > > Thanks for yout interest for this plexus-to-spring migration helper. > > > > The code is still early experimental and requires some more testing > > > : it > > > > only has been tested on 2 archiva testcases and requires many fixes > > > and > > > > testcases to get stable. > > > > > > > > Please give me one week to test it more, add debugging logs and > > > better error > > > > handling / reporting : The current code is not really easy to debug > > > when > > > > some unexpected IoC occur... I also may improve support for plexus > > > lifecycle > > > > and specificities, as long as I discover requirements from archiva > > > codebase. > > > > > > > > It is allready isolated from archiva for reuse, and can move to > > > plexus when > > > > ready (I've no access to plexus svn). > > > > > > > > I promise to inform you about progress ;-) > > > > > > > > Nicolas. > > > > > > > > 2008/2/25, Rahul Thakur : > > > > > > > >> Hi Nicolas, > > > >> > > > >> Sorry, I have looked at the recent updates to the code, hence my > > > >> question. Is this 'ready' enough to be used outside Archiva? I'd > > > like to > > > >> integrate this into Continuum. > > > >> > > > >> I think it might make sense to have this module in Plexus SVN repo > > > - wdyt? > > > >> > > > >> Good stuff! > > > >> > > > >> Cheers, > > > >> Rahul > > > >> > > > >> nicolas de loof wrote: > > > >> > > > >>> Hello, > > > >>> > > > >>> I've repackaged and improved the spring support for plexus > > > components in > > > >>> > > > >> a > > > >> > > > >>> dedicated poject > > > >>> --> > > > >>> > > > >>> > > > >> > > > https://svn.apache.org/repos/asf/maven/archiva/branches/springy/plexus-spring/ > > > >> > > > >>> This new module provides runtime translation from plexus component > > > >>> descriptors to a Spring XML context, using a simple XSL file and a > > > >>> > > > >> custom > > > >> > > > >>> ApplicationContext. Any existing plexus jars can then be used in a > > > >>> > > > >> spring > > > >> > > > >>> context. > > > >>> > > > >>> It defines a custom spring-namespace. Under the hood a > > > custom > > > >>> FactoryBean handles plexus components field-injection and (some) > > > >>> > > > >> lifecycle > > > >> > > > >>> interfaces. As I discover plexus features by testing on archiva, > > > I'd be > > > >>> pleased to get more infos on plexus IoC specificities. > > > >>> > > > >>> It also provides a PlexusInSpringTestCase that is a replacement > > > class > > > >>> > > > >> for > > > >> > > > >>> PlexusTestCase, providing equivalent methods and behavior. > > > >>> > > > >>> I've applied this (in springy branch) on archiva-policies and > > > >>> > > > >> archiva-proxy > > > >> > > > >>> (with some test failures in latest I have to investigate) > > > >>> > > > >>> On this basis and with the required improvements, I thing this is > > > a nice > > > >>> > > > >> way > > > >> > > > >>> to move archiva (or other plexus-based app) to spring and then > > > gradually > > > >>> refactor plexus components, either using Spring annotation or XML > > > >>> > > > >> context > > > >> > > > >>> files (my +1 for context files). > > > >>> > > > >>> Nicolas. > > > >>> > > > >>> > > > >>> > > > > > > > > > > > > > > > > > ------=_Part_13777_22128931.1204131390568--