maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenney Westerhof <ken...@apache.org>
Subject Re: How to get ${localRepository} from plexus component (not mojo)
Date Mon, 09 Oct 2006 07:38:12 GMT

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 <component> 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


Mime
View raw message