No I did not send that message 5 times.
I need the localRepository for calls like:
<snip>
artifactCollector.collect(
project.getDependencyArtifacts(),
project.getArtifact(),
managedVersions,
getArtifactRepository(), // ${localRepository}
project.getRemoteArtifactRepositories(),
artifactMetadataSource,
null,
Collections.singletonList(listener));
</snip>
or:
<snip>
getArtifactResolver().resolve(artifact, getProject
().getRemoteArtifactRepositories(), getArtifactRepository());
</snip>
--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 <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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]