Return-Path: Delivered-To: apmail-maven-dev-archive@www.apache.org Received: (qmail 42566 invoked from network); 10 Oct 2006 21:59:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Oct 2006 21:59:26 -0000 Received: (qmail 59520 invoked by uid 500); 10 Oct 2006 21:59:24 -0000 Delivered-To: apmail-maven-dev-archive@maven.apache.org Received: (qmail 59486 invoked by uid 500); 10 Oct 2006 21:59:24 -0000 Mailing-List: contact dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Developers List" Reply-To: "Maven Developers List" Delivered-To: mailing list dev@maven.apache.org Received: (qmail 59475 invoked by uid 99); 10 Oct 2006 21:59:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 14:59:23 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jason.dillon@gmail.com designates 64.233.162.201 as permitted sender) Received: from [64.233.162.201] (HELO nz-out-0102.google.com) (64.233.162.201) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 14:59:23 -0700 Received: by nz-out-0102.google.com with SMTP id 12so4888nzp for ; Tue, 10 Oct 2006 14:59:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=b6NvNz+ZMoA36+82oGq1d1P3X5ngjpbX6rIluTzm0T6tn9rPhRcW6r/bIh072WUsv01b9hw10r0SyT0mRAyM6/H/TQaL/KnvXZOilj+2zn6THCaHrzFhWqOxHE1VoUYXUEP7gs1pdf0UKTVRIc+1NmLhviYy4ekJMWWFxl8x5pY= Received: by 10.64.249.18 with SMTP id w18mr22326qbh; Tue, 10 Oct 2006 14:59:01 -0700 (PDT) Received: from ?10.0.1.3? ( [24.7.69.241]) by mx.google.com with ESMTP id f12sm34207qba.2006.10.10.14.59.00; Tue, 10 Oct 2006 14:59:01 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <9C2F4F1E-BE31-4051-94E1-EF7E0927CE0F@maven.org> References: <4529FC64.60804@apache.org> <3F7E7A5F-440E-4E5D-B72A-DC5711647F2C@planet57.com> <3CB5FB21-8E53-4961-9A41-F4FBB05ECAD6@planet57.com> <9C2F4F1E-BE31-4051-94E1-EF7E0927CE0F@maven.org> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <65391FB4-6382-4F8A-B773-B85BE908CBD2@planet57.com> Content-Transfer-Encoding: 7bit From: Jason Dillon Subject: Re: How to get ${localRepository} from plexus component (not mojo) Date: Tue, 10 Oct 2006 14:58:56 -0700 To: "Maven Developers List" X-Mailer: Apple Mail (2.752.3) Sender: Jason Dillon X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Okay, how does my mojo get access to that? --jason On Oct 10, 2006, at 2:22 PM, Jason van Zyl wrote: > > On 10 Oct 06, at 4:17 PM 10 Oct 06, Jason Dillon wrote: > >> Is the MavenSession bound to a component? Or can I pluck it some >> other way from the plexus container? >> > > It's created and passed around. If you want something that is going > to stick around look at MavenExecutionRequest, that's really the > only thing you should be looking at as far as 2.1 goes. > > Jason. > >> --jason >> >> >> On Oct 9, 2006, at 6:25 AM, Jason van Zyl wrote: >> >>> What is it that you're actually trying to do? >>> >>> Jason. >>> >>> On 9 Oct 06, at 3:03 AM 9 Oct 06, Jason Dillon wrote: >>> >>>> No I did not send that message 5 times. >>>> >>>> I need the localRepository for calls like: >>>> >>>> >>>> artifactCollector.collect( >>>> project.getDependencyArtifacts(), >>>> project.getArtifact(), >>>> managedVersions, >>>> getArtifactRepository(), // ${localRepository} >>>> project.getRemoteArtifactRepositories(), >>>> artifactMetadataSource, >>>> null, >>>> Collections.singletonList(listener)); >>>> >>>> >>>> or: >>>> >>>> >>>> getArtifactResolver().resolve(artifact, getProject >>>> ().getRemoteArtifactRepositories(), getArtifactRepository()); >>>> >>>> >>>> --jason >>>> >>>> >>>> On Oct 9, 2006, at 12:38 AM, Kenney Westerhof wrote: >>>> >>>>> >>>>> Is it my mail client or did you really send this message 5 times? >>>>> >>>>> The settings object (which contains the local repo) is not a >>>>> component, >>>>> so you can't inject that. >>>>> You could re-parse the settings.xml yourself, but that's not a >>>>> nice >>>>> solution. >>>>> >>>>> I think you're stuck with passing the settings or local repo to >>>>> the component >>>>> on method calls, or call a setter. >>>>> >>>>> Btw, why do you need the local repository? If it's for artifact >>>>> resolution you could also a component from maven-artifact(- >>>>> manager). >>>>> >>>>> -- Kenney >>>>> >>>>> Jason Dillon wrote: >>>>>> Anyone know how to get the "${localRepository}" >>>>>> ArtifactRepository from a Plexus component... not a mojo. >>>>>> More specifically I have created a new component, which I >>>>>> inject into my mojo (with @component and a role >>>>>> defined in plexus/components.xml) and I want that injected >>>>>> component to have access to "${localRepository}", but I don't >>>>>> want to define that in my mojo and pass it in to the component >>>>>> each time it needs it. >>>>>> Anyone know how to do this? >>>>>> Thanks, >>>>>> --jason >>>>>> ----------------------------------------------------------------- >>>>>> ---- >>>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org >>>>>> For additional commands, e-mail: dev-help@maven.apache.org >>>>> >>>>> ------------------------------------------------------------------ >>>>> --- >>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org >>>>> For additional commands, e-mail: dev-help@maven.apache.org >>>>> >>>> >>>> >>>> ------------------------------------------------------------------- >>>> -- >>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org >>>> For additional commands, e-mail: dev-help@maven.apache.org >>>> >>>> >>> >>> >>> -------------------------------------------------------------------- >>> - >>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org >>> For additional commands, e-mail: dev-help@maven.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org >> For additional commands, e-mail: dev-help@maven.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > For additional commands, e-mail: dev-help@maven.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org For additional commands, e-mail: dev-help@maven.apache.org