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:
<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]
---------------------------------------------------------------------
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]