On 2011-07-05 01:51, Benson Margulies wrote:
> On Mon, Jul 4, 2011 at 6:11 PM, Dennis Lundberg <[email protected]> wrote:
>> Hi
>>
>> I'm trying to replace an old version 2.0 MavenEmbedder in the
>> aspectj-maven-plugin, over at mojo@codehaus. That's because we can't
>> upgrade other Maven core dependencies while the embedder is being used.
>>
>> In a class that extends AbstractMojoTestCase we have this code:
> Start at git://git.eclipse.org/gitroot/m2e/m2e-core.git.
> 
> Then look in org.eclipse.m2e.core.
> 
> To see how the new m2e code does this stuff.

Thank you Benson. I see now that I wasn't very clear when I wrote the
above. What I am trying to do is remove the embedder, because I don't
believe it is needed anymore.

I guess the m2e code will show me how to use the Maven 3 embedder, right?

>>
>>        MavenEmbedder embedder = new MavenEmbedder();
>>
>>        embedder.setClassLoader(
>> Thread.currentThread().getContextClassLoader() );
>>        embedder.setLogger( new MavenEmbedderConsoleLogger() );
>>        embedder.start();
>>        ArtifactRepository localRepository = embedder.getLocalRepository();
>>
>> Now the only thing the embedder is used for is to create the
>> localRepository variable. There must be a better way to do this, but I
>> can't find out how. Does anyone have an idea they can share?
>>
>>
>> --
>> Dennis Lundberg
>>
>> ---------------------------------------------------------------------
>> 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]
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to